ft_containers


Reimplementing C++ Containers, for study purposes :)

VECTOR ✅

Member functions

  • Constructor
  • Destructor
  • operator=

Iterators:

  • begin
  • end
  • rbegin
  • rend
  • cbegin
  • cend
  • crbegin
  • crend

Capacity:

  • size
  • max_size
  • resize
  • capacity
  • empty
  • reserve
  • shrink_to_fit

Element access:

  • operator[]
  • at
  • front
  • back
  • data

Modifiers:

  • assign
  • push_back
  • pop_back
  • insert
  • erase
  • swap
  • clear
  • emplace
  • emplace_back

Allocator:

  • get_allocator

Non-member function overloads

  • relational operators
  • swap

STACK ✅

Member functions

  • Constructor
  • empty
  • size
  • top
  • push
  • pop
  • swap

Non-member function overloads

  • relational operators
  • swap (stack)

Non-member class specializations

  • uses_allocator

MAP ⌛

Member functions

  • Constructor
  • Destructor
  • operator= // Operator[] , see how to insert with = after returning this value

Iterators:

  • begin
  • end
  • rbegin
  • rend
  • cbegin
  • cend
  • crbegin
  • crend

Capacity:

  • size
  • max_size
  • empty

Element access:

  • operator[]
  • at

Modifiers:

  • insert
    • Return last value inserted
    • Why inserting with [] is skipping numbers ?
  • erase //Mising erase for Position
  • swap
  • clear
  • emplace
  • emplace_hint

Observers:

  • key_comp
  • value_comp

Operations:

  • find
  • count
  • lower_bound
  • upper_bound
  • equal_range

Allocator:

  • get_allocator