Container Classes


STL containers are grouped into the following categories.

Following is a list and brief description of the classes in each category. Refer to First Class Containers for details on using the first two container types (sequential and associative). Adaptive containers are discussed in Adaptive Containers

Associative containers beginning with hash_ are hash containers. Hash containers are only a proposed addition to the ANSI/ISO Standard Template Library, and have not been accepted for inclusion in the final specification. We have included hash containers in Standards<ToolKit> to provide you with the latest STL technology available.

Sequential Containers

bitset represents and manipulates fixed-size sequences of bits
deque linear, non-contiguous storage, fast inserts at extremities
list doubly-linked list, fast inserts anywhere
vector linear, contiguous storage, fast inserts at the end only
vector< bool > specialized version of vector optimized for boolean operations

Associative Containers

map collection of one-to-one mappings
multimap collection of one-to-many mappings
hash_map collection of one-to-one mappings using optimized hash mechanism
hash_multimap collection of one-to-many mappings using optimized hash mechanism, duplicates allowed
set set of items, provides fast associative lookup, duplicates are not allowed
multiset similar to set, except duplicates are allowed
hash_set hash-based set of unique elements, with fast associative lookup
hash_multiset hash-based set of items, fast associative lookup, duplicates allowed

Adaptive Containers

priority_queue maintains items in a sorted order
queue strict first-in, first-out data structure
stack strict first-in, last-out data structure

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.