Standard Library Reference
76 pages covering the C++ standard library — containers, algorithms, concurrency, memory, and modern utilities up to C++26.
Containers
13 pagesSequence, associative, unordered, and flat containers. When to use each.
"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++11Algorithms
8 pagesSorting, searching, transforming, set operations, numeric algorithms, parallel policies.
Complete reference for C++ numeric algorithms: accumulate, reduce, transform_reduce, prefix scans, gcd, lcm, midpoint, lerp, and parallel variants.
C++98C++17 execution policies for STL algorithms — par, par_unseq, reduce, transform_reduce, scan, thread safety, and platform requirements.
C++17"C++20 ranges and views: range concepts, lazy view adaptors, composable pipelines, projections, and the pitfalls that bite experienced engineers."
C++20C++ searching algorithms — std::find, binary_search, lower_bound, upper_bound, equal_range, search, and C++20 ranges equivalents with projections.
C++98Set algorithms operating on sorted ranges and heap operations — multiset semantics, complexity guarantees, and C++20 ranges versions.
C++98"C++ sorting: std::sort, std::stable_sort, std::partial_sort, std::nth_element, ranges variants, custom comparators, and strict weak ordering."
C++98Complete guide to <algorithm> and std::ranges algorithms — sorting, searching, transforming, partitioning, and parallel execution.
C++98Deep reference for std::transform, for_each, copy, fill, generate, remove, rotate, and C++20 ranges equivalents with pitfalls and best practices.
C++98Concurrency
10 pagesThreads, mutexes, atomics, futures, jthread, semaphore, latch, barrier.
std::condition_variable — atomic wait/notify, spurious wakeup handling, timed waits, condition_variable_any, and C++20 stop_token integration.
C++11C++ lock-free programming — compare_exchange, memory orders, Treiber stack, ABA problem, safe reclamation, and when to prefer mutexes.
C++11C++20 counting_semaphore, binary_semaphore, latch, and barrier — efficient thread synchronization primitives with defined happens-before semantics.
C++20"C++11 async primitives: std::async for task-based concurrency, future/promise as a one-shot cross-thread value channel, packaged_task for callable wrapping."
C++11std::atomic<T> provides lock-free atomic operations with configurable memory ordering — covers memory orders, CAS loops, atomic_flag, atomic_ref, wait/notify, and fences.
C++11P2300 Senders/Receivers: structured, composable async that decouples work from execution context — portable parallelism across thread pools, GPU queues, and event loops without callbacks.
C++26"C++20 std::jthread: auto-joining thread with cooperative cancellation via stop_token, stop_source, and stop_callback."
C++20C++ mutual exclusion primitives — mutex variants, RAII lock guards, condition variables, and correct patterns for thread-safe code.
C++11C++11 portable threading model — thread creation, mutual exclusion, lock-free atomics, and condition-variable signaling for safe concurrent programs.
C++11C++ thread_local — per-thread variables, initialization semantics, destruction order, async pitfalls, and performance characteristics.
C++11Memory
8 pagesSmart pointers, allocators, placement new, memory resources (PMR).
C++ custom allocators and C++17 polymorphic memory resources: arena, pool, PMR containers, allocator propagation, and zero-heap hot paths.
C++17C++ memory management — RAII, smart pointers, arenas, PMR allocators, object pools, placement new, and avoiding heap pitfalls.
C++11Construct objects in pre-allocated memory using placement new, std::construct_at, std::destroy_at, and std::launder for allocators, pools, and variant storage.
C++98unique_ptr, shared_ptr, and weak_ptr — ownership semantics, control block internals, custom deleters, cycle breaking, and enable_shared_from_this.
C++11A reference-counted smart pointer that enables shared ownership of a dynamically allocated object, deleting it when the last owner is destroyed.
C++11Exclusive-ownership smart pointer that automatically frees its managed object when it goes out of scope, with zero overhead over a raw pointer.
C++11A non-owning smart pointer that observes a shared_ptr-managed object without extending its lifetime, enabling cycle-breaking and safe expiry detection.
C++11C++ weak_ptr usage patterns — breaking cycles, observers, caches, enable_shared_from_this, and thread-safe access via lock().
C++11Strings
4 pagesstd::string, std::string_view, std::format, string algorithms, conversions.
C++20 std::format and C++23 std::print — type-safe formatted output with compile-time checking, custom formatters, and efficient direct printing.
C++20"The C++ standard string class — mutable, owning character sequences with construction, modification, searching, and conversions. Zero-copy alternatives: std::string_view."
C++98Non-owning view of a character sequence. Zero-copy alternative to const std::string&. Accepts literals, std::string, and char arrays without allocation.
C++17C++ string conversions — to_string, stoi/stof, from_chars, to_chars, and std::format with C++ version discipline and performance trade-offs.
C++11Utilities
33 pagesoptional, variant, expected, any, function, chrono, filesystem, span, bitset, and more.
"C++ iostream system: standard streams, file and string streams, stream state, manipulators, custom operators, rdbuf redirection, and performance tuning."
C++98"C++ numeric algorithms: accumulate, reduce, transform_reduce, prefix scans, inner_product, iota, gcd, lcm, midpoint, and lerp with parallel execution notes."
C++98C++ <random> engines, distributions, seeding strategies, thread safety, and common pitfalls — from mt19937 to discrete_distribution.
C++11Type-safe, type-erased container for a single value of any copy-constructible type, with runtime type queries and checked casts.
C++17Thread-safe atomic operations without mutexes — memory orders, CAS loops, atomic_flag, atomic_ref (C++20), wait/notify (C++20), and lock-free patterns.
C++11Fixed-size bit manipulation with set/reset/flip/test, bitwise operators, and integer/string conversions — stack-allocated, no heap, no UB from shift overflow.
C++98Type-safe time and duration library — durations, clocks, time points, and C++20 calendar and timezone types.
C++11Advanced C++ chrono covering C++20 calendar types, time zones, zoned_time, date arithmetic, DST edge cases, formatting, and clock selection.
C++20C++23 vocabulary type holding either a success value T or an error value E, making failure modes explicit in the return type without exceptions.
C++23Cross-platform filesystem operations in C++17 — path manipulation, directory traversal, file status queries, and file I/O utilities.
C++17C++23 sorted contiguous-memory container adapters with O(log n) binary search and cache-friendly layout — no pointer chasing through tree nodes.
C++23Type-safe, compile-time-checked text formatting introduced in C++20, replacing printf and stream-based output with Python-style format strings.
C++20C++17 charconv — locale-independent, non-allocating, non-throwing conversion between numbers and character buffers.
C++17A general-purpose polymorphic function wrapper that type-erases any callable matching a given signature, at the cost of runtime overhead.
C++11std::hash specialization, hash_combine design, transparent heterogeneous lookup (C++20), and custom hash requirements for unordered containers.
C++11Fixed-capacity vector with inline storage — dynamic size 0..N, no heap allocation, constexpr-compatible, and full std::vector-compatible API.
C++26Multi-dimensional non-owning view over contiguous data with pluggable layout and accessor policies. C++23 replacement for raw pointer and stride arithmetic.
C++23A value-or-nothing wrapper that eliminates sentinel values and nullable pointer workarounds in C++17.
C++17C++23 and_then, transform, and or_else on std::optional enable composable error-propagation pipelines without nested nullopt checks.
C++23std::pair and std::tuple store multiple values. Structured bindings, std::tie, std::apply, and composition patterns for heterogeneous data.
C++11C++ regular expressions — regex_match, regex_search, regex_replace, capture groups, iterators, and when to reach for a faster library.
C++11C++11 allocator adaptor that propagates one or more allocators through every nesting level of a container hierarchy via std::uses_allocator.
C++11std::simd<T, Abi>: type-safe portable SIMD in C++26 (P1928) — write vectorized code once, compile to SSE/AVX/NEON/SVE automatically without intrinsics or platform ifdefs.
C++26Capture file, line, column, and function name at the call site without macros — the C++20 replacement for __FILE__ and __LINE__.
C++20Non-owning view over a contiguous sequence of objects. C++20's type-safe replacement for (pointer, length) pairs, working with arrays, vectors, std::array, and raw buffers.
C++20Capture and inspect runtime call stacks with std::stacktrace — frame iteration, exception integration, allocator control, and compiler setup.
C++23"C++20 cooperative cancellation primitives: stop_token, stop_source, stop_callback, and jthread integration for safe thread shutdown."
C++20"Non-owning, read-only string reference (C++17): zero-copy substrings, universal parameter type, constexpr usage, and lifetime hazards."
C++17Fixed-size heterogeneous collections with value semantics — pair for two values, tuple for N values of any types, with structured bindings support.
C++11Type-safe tagged union holding exactly one of a fixed set of alternative types, introduced in C++17 with no heap allocation.
C++17C++ string operations — searching, splitting, trimming, case conversion, replace-all, and fast number parsing with from_chars and string_view.
C++98Fast, locale-independent parsing with from_chars/to_chars (C++17), convenient stoi/stod (C++11), and locale-aware formatting via std::locale and its facets.
C++11"Compile-time type inspection and transformation via <type_traits>: primary categories, property queries, type modifications, and custom trait authoring."
C++11