xhazm / ft_containers

C98 Containers - coded to understand, understood to be coded

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ft_containers - 42 Heilbronn(February 2023)

Description

My personal implementation of some of the container class templates from the C++ standard template library (STL). This also included the corresponding iterator systems as well as the required utilities.

The goal was to get a better understanding of the internal functionality of the different holder objects and the tradeoffs in complexity involved.

Containers: vector, map, stack, set

Utils : iterator_traits, iterators, reverse_iterator, enable_if, is_integral, equal, lexicographical_compare, pair, make_pair

Implementation

To facilitate full interoperability between my containers and the STL algorithms I was following the original implementation of the STL source code closely. A good overview over the required member functions and their declarations was provided by cplusplus.com. To guarantee time complexity comparable to the STL containers an auto-balancing Red-Black Tree was chosen as the underlying data structure for map and set. The entire code is written in accordance to the C++98 standard.

Testing

To check my own implementation against the original STL version, a test file, which tests for runtime and function is included.

About

C98 Containers - coded to understand, understood to be coded


Languages

Language:C++ 98.9%Language:Makefile 1.1%