The Containers library is a generic collection of class templates and algorithms that allow programmers to easily implement common data structures like queues, lists and stacks. There are three classes of containers -- sequence containers, associative containers, and unordered associative containers -- each of which is designed to support a different set of operations.
The container manages the storage space that is allocated for its elements and provides member functions to access them, either directly or through iterators (objects with similar properties to pointers).
Most containers have at least several member functions in common, and share functionalities. Which container is the best for the particular application depends not only on the offered functionality, but also on its efficiency for different workloads.
Sequence containers implement data structures which can be accessed sequentially.
Associative containers implement sorted data structures that can be quickly searched (O(log n) complexity).
Unordered associative containers
Unordered associative containers implement unsorted (hashed) data structures that can be quickly searched (O(1) amortized, O(n) worst-case complexity).
Container adaptors provide a different interface for sequential containers.
Member function table
|- functions present in C++03|
|- functions present since C++11|
(A PDF version of this table is available at File:container-library-overview-2012-12-27.pdf.)