Skip to content

savosaicic/ft_containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_containers

Re-implementations of some of the C++98 STL containers and utilities, written in the ft namespace for my 42 school project.

Implemented

Containers

  • ft::vector (no vector<bool> specialization)
  • ft::map
  • ft::set with an rb_tree
  • ft::stack (defaults to ft::vector as underlying container, but remains compatible with others) Utilities & traits
  • std::iterator_traits
  • std::reverse_iterator
  • std::enable_if (SFINAE, re-created in C++98)
  • std::is_integral
  • std::pair, std::make_pair
  • std::equal and/or std::lexicographical_compare

Tests

Run all tests

# Functional tests
./run_tests.sh

# Speed tests
./run_tests.sh -s
  • Binaries: bin/ (e.g., ft_test_map_begin, std_test_map_begin, …)
  • Logs: logs/ (build and run logs per test)
  • The script builds and runs both namespaces (ft & stl) and prints ✅/❌ per case.

Run a single test manually

# Build one test for both namespaces (example: map_begin)
make ft_test_map_begin  n=ft
make std_test_map_begin n=std

# Run them
./bin/ft_test_map_begin
./bin/std_test_map_begin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published