This was a project for 42Heilbronn school's curriculum.
The goal of this project is to implement the STL containers - vector, map, stack and set - as well as some additional utilities.
The containers are implemented in the ft namespace and use std::allocator as the default allocator.
They are designed to be compatible with the STL containers and include all the member functions, non-member functions, and overloads of the standard containers.
- vector: Implementation of the vector container.
- map: Implementation of the map container.
- stack: Implementation of the stack container.
- set: Implementation of the set container.
- iterator_traits: Implementation of std::iterator_traits.
- reverse_iterator: Implementation of std::reverse_iterator.
- enable_if Implementation of std::enable_if.
- is_integral: Implementation of std::is_integral.
- equal: Implementation of std::equal.
- lexicographical_compare: Implementation of std::lexicographical_compare.
- pair: Implementation of std::pair.
- make_pair: Implementation of std::make_pair.
The underlying data structure of map and set is a red-black-tree.
run make
This creates two executables: ft_containers and std_containers.
by running ./compare.sh
the outputs of both binaries are compared.
by running ./speedtest.sh
the runtimes of both programs are compared.
All the implemantations are located in the include folder.