This is a repo containing lots of custom C++ STL implementations. Each folder contains the implementation (template header) of an STL member, with a README for more info on what features are included, and what are omitted.
vectorstring
plusminuslessgreater
unique_ptr
Respective iterators are included with the containers (e.g. random access for vector, bidirectional for set, etc.).
dequelist
unordered_mapunordered_setmapset
stackqueuepriority_queue
copyfilltransformrotatemax_elementmin_elementaccumulatecountfind
shared_ptrweak_ptr
This repo uses GoogleTest to unit test.
To build and test everything (all tests in tests directory), run
bazel test //tests/...To build and test a specific container, run
bazel test //tests/<some_test_target>, e.g. bazel test //tests:vector_test
There is a root main.cc file, to be used as a playground. After adding any deps to the root level BUILD file, run
bazel run //:mainTo run with valgrind, run:
bazel run -c dbg --run_under="valgrind --leak-check=full --show-leak-kinds=all" //:main