The ft_containers project aims to implement a few container types of the C++ standard template library. The goal is to re-implement standard C++ containers to ensure a solid understanding of their functionality and underlying structure. This project version is 5.2.
The project involves implementing the following containers:
vector: A dynamic array container similar tostd::vector. The specialization forvector<bool>is not required.map: An associative container that stores key-value pairs in a sorted order, similar tostd::map.stack: A container adapter that uses your implementedvectorclass as the default underlying container. It should be compatible with other containers, including the standard ones.
Additionally, you must also implement the following C++98 features:
std::iterator_traitsstd::reverse_iteratorstd::enable_ifstd::is_integralstd::equaland/orstd::lexicographical_comparestd::pairstd::make_pair
To compile the project, use the following guidelines:
- Compile your code with
c++and the flags-Wall -Wextra -Werror. - The code should still compile with the flag
-std=c++98. - The project must include a
Makefilethat compiles the source files without relinking. - The
Makefileshould contain at least the rules:$(NAME),all,clean,fclean, andre.
To use the implemented containers, follow these steps:
- Clone the
ft_containersproject to your local machine. - Compile the project using the provided
Makefile. - Run the test binaries for both your implemented containers and the standard library containers.
- Compare the outputs and performance/timing, noting that your containers may be up to 20 times slower.
Note: For more details on the project requirements, refer to the original instructions provided in the project folder.
Happy coding!