Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix A: features and compilers

This appendix lists the C++ features the book uses. It shows the proposal that introduced or significantly changed each feature. It also shows the compiler support in the pinned toolchain (Clang 22.1.8, libc++). The required flag or header is listed. Finally it indicates whether the book compiles an example or marks it as a gap.

Compiled means the book ships a real example that builds and runs. Gap means the feature is taught prose-first and registered so it builds only with BOOK_ENABLE_GAPS=ON. A “Not yet deployable” callout names the supporting compiler if any.

FeatureProposalClang 22.1.8Flag / headerStatus
std::format / std::print / std::printlnP0645, P2093Yes<format>, <print>, -std=c++26Compiled
std::mdspanP0009Yes<mdspan>Compiled
std::numbers constantsP0631Yes<numbers>Compiled
ConceptsP0734Yes-std=c++20+Compiled
consteval, constinit, is_constant_evaluatedP1073, P1143, P0595Yes-std=c++20+Compiled
Transient constexpr allocationP0784Yes-std=c++20+Compiled
Class-type NTTPsP0732Yes-std=c++20+Compiled
User-defined literalsC++11Yes-std=c++20+Compiled
std::generatorP2502Yes<generator>Compiled
std::jthread / stop tokensP0660Yes<thread>, <stop_token>Compiled
std::atomic_refP0019Yes<atomic>Compiled
std::scoped_lockP0156Yes<mutex>Compiled
std::ranges / viewsP0896, P2325Yes<ranges>, <algorithm>Compiled
std::execution::parP0024No<execution>Prose only
Contracts ([[assert]], [[expects]], [[ensures]])P2900No (GCC 16)-fcontractsGap
std::execution (P2300 senders)P2300No<execution>Gap
std::linalgP1673No<linalg>Gap
Static reflectionP2996No (GCC 16 partial)<experimental/meta>Gap
<hazard_pointer> / <rcu>P2530, P2546No<hazard_pointer>, <rcu>Gap
Modules (import, export module)P1103Partial-std=c++26, BMIGap
Lifetime-safety analysisP1179Experimental-Xclang -fexperimental-lifetime-safetyCompiled (demos)

The Nix dev shell in flake.nix provides the pinned toolchain. The book compiles only verified examples. Newer features are taught with exact syntax and an honest callout.