Stl

Strange Template Library


STL is made up of containers to store data, iterators to access the elements in containers and algorithms to perform operations on containers.

    • Threads: Documentation about C++ threads is in my Thread API section.
    • <chrono>

Containers

Sequence containers are vector, deque and list. Associative containers are set, multiset, map and multimap. The container adaptors are stack, queue and priority_queue.

vector

list

deque

set

multiset

map

multimap

stack

queue

priority_queue

array (C++11)

forward_list (C++11)

unordered_map (C++11)

unordered_multimap (C++11)

unordered_multiset (C++11)

unordered_set (C++11)

Algorithms

Those with a * have a _if version

Non-modifying

  • Find*
  • For_each
  • Count*

Modifying

  • Copy*
  • Swap_ranges
  • Remove*
  • Reverse
  • rotate
  • random_shuffle

Sorting

  • sort
  • stable_sort
  • partial_sort