This is a simple STL implementation in C++. The main purpose of this project is to understand the basic principles of STL and to practice C++ programming.
This project includes the following containers of STL and implements some classic algorithms.
- Vector
- List
- Stack
- Queue
- Priority Queue
- Deque
- Map
- Set
- Multimap
- Multiset
- Unordered Map
- Unordered Set
- Unordered Multimap
- Unordered Multiset
- Iterator
- Reverse Iterator
- Allocator
- Function Object
- Hash Function
- Pair
- Tuple
- '...' means that the feature is not implemented yet.
- 'x' means that the feature is implemented.
- Clone the repository.
- Include the header file of the container you want to use. For example if you want to use vector, you should include the following line in your code.
#include <jianqiao/jianqiao_vector.hpp>And don't forget to state that the namespace is Jianqiao.
using namespace Jianqiao;You can also use the following line to avoid the namespace.
using Jianqiao::vector;- add the following line in your cmake file.
target_include_directories(your_target_name PRIVATE path_to_JianqiaoSTL)for example in my test file you could find the following lines
target_include_directories(test_sort PRIVATE
../../../include
../../../include/jianqiao
)