Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shimazadeh/ft_container
Designed C++ container classes (vector/list/map) from ground up and free from reliance existing libraries, using template metaprogramming techniques, providing essential data structures.
https://github.com/shimazadeh/ft_container
algorithm cpp98 stl-containers
Last synced: about 1 month ago
JSON representation
Designed C++ container classes (vector/list/map) from ground up and free from reliance existing libraries, using template metaprogramming techniques, providing essential data structures.
- Host: GitHub
- URL: https://github.com/shimazadeh/ft_container
- Owner: shimazadeh
- Created: 2022-12-07T17:21:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-04T19:34:06.000Z (about 1 year ago)
- Last Synced: 2024-10-12T16:01:37.545Z (about 1 month ago)
- Topics: algorithm, cpp98, stl-containers
- Language: C++
- Homepage:
- Size: 265 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ft_container
Designed C++ container classes (vector/list/map) from ground up and free from reliance existing libraries,
using template metaprogramming techniques, that behave exactly like the C++ 98 STL containers.## Requirmenet and Limitations
The containers in Ft_container adhere to the following requirements:
- They must have all public member functions from C++98.
- The corresponding iterators must also be implemented.
- The project includes the following containers:
- Vector
- Map
- Stack## How to use:
The containers are templated, meaning you can use them with any type, just like you would any other STL containers.
Just include the .hpp corresponding to the container you want to use, and use it! The difference is the namespace
where you would call std::vector, you now call ft::vector. Example of use:
#include "includes/vector.hpp"
#include "includes/map.hpp"
#include "includes/stack.hpp"
// Containers are in the 'ft' namespace
ft::vector vector;
ft::map map;
ft:stack stack;
## Sources:
Here are some useful references for working with C++ containers:
- [C++ Reference](https://cplusplus.com/reference/stl/)
- [CPP Reference](https://en.cppreference.com/w/)
## Testers:
You can use these testers to validate the correctness of your containers:
- [containers_test by @mli42](https://github.com/mli42/containers_test)
- [ft_container_tester by @Mazoise](https://github.com/Mazoise/42TESTERS-CONTAINERS)