Containers
13 container reference pages — sequence, associative, unordered, and flat containers.
"Sequential containers and adaptors: deque for double-ended operations, list for stable iterators, queue/stack/priority_queue adaptors. Choose based on insertion pattern and iterator requirements."
C++98Fixed-size contiguous array wrapper with value semantics, bounds checking, and full STL compatibility.
C++11Sorted associative container adapters backed by contiguous storage — O(log n) binary search with cache-friendly memory layout, ideal for read-heavy workloads.
C++23C++ std::forward_list for singly-linked storage with O(1) front insertion, minimal memory per node, forward-only iteration, and when to use it over std::list.
C++11std::map (sorted red-black tree, O(log n)) and std::unordered_map (hash table, O(1) avg): when to pick each, how to tune performance, and C++17/20/23 additions.
C++98Ordered associative containers allowing duplicate keys — equal_range, node handles, erase semantics, and flat variants.
C++98Ordered unique-element container backed by a red-black tree (set) and hash-table unique-element container (unordered_set) in C++.
C++98"C++20 std::span: a zero-overhead view over contiguous data. Fixed vs dynamic extent, subspans, byte reinterpretation, and API design patterns."
C++20C++ container adaptors — stack (LIFO), queue (FIFO), and priority_queue (heap-based) with underlying container selection, complexity, and practical patterns.
C++98std::string — owning mutable character sequence with SSO, full modification API, searching, numeric conversions, and C++17/20/23 additions.
C++98Hash map with O(1) average insert, lookup, and erase — the default associative container when key ordering is irrelevant.
C++11Dynamic contiguous array container. Default choice for sequential collections. O(1) random access and amortized O(1) append. Reallocates when capacity exhausted.
C++98Hash-based sets with O(1) average lookup—custom hashing, rehashing, iterator invalidation, C++17/20 additions, and performance traps.
C++11