C++ Standards and C++26
|
This section documents C++23 (ISO/IEC 14882:2024), as published by ISO/IEC JTC1/SC22/WG21 (wg21), verified against the freely available working draft N5046 (eel.is/c++draft) and cppreference.com. This content was generated with the assistance of AI and should be verified against the working draft and cppreference.com before being relied on in production. This section’s bibliography lists the reference material consulted while preparing these pages. |
This section has targeted C++23 throughout, flagging C++20/23-only features against their C++17 fallback where a toolchain gap made that concrete (see Getting Started). This closing page puts every edition on one timeline and looks ahead to C++26.
The Editions, C++98 to C++23
| Edition | Year | Headline features |
|---|---|---|
C++98/03 |
1998/2003 |
The original ISO standard; the STL (containers, iterators, algorithms); templates; exceptions. |
C++11 |
2011 |
|
C++14 |
2014 |
Generic lambdas, generalized |
C++17 |
2017 |
Structured bindings, |
C++20 |
2020 |
Concepts, ranges, coroutines, modules, |
C++23 |
2023 |
|
This progression is visualized below, and every page in this section links the specific cppreference/WG21 source for the features it covers — this table is a map, not a replacement for those primary sources.
Feature-Test Macros
Covered in Namespaces, Modules, and
the Preprocessor — <version> and macros like cpp_concepts/cpp_lib_expected let code detect,
per-feature, exactly what a given compiler+standard-library combination actually implements, which — as this
section’s own toolchain notes (e.g. <print>, <generator>, <flat_map>, <mdspan> not yet in this
environment’s libstdc++ 13) demonstrate — can lag behind the -std= flag accepting a given edition at all.
Compiler Support Pages
Three living references track exactly which features each compiler/version/standard-library ships, and are the
correct place to check before relying on a specific C++20/23 feature in a real project (rather than trusting
-std=c++23 alone to mean "every C++23 feature is available"):
-
cppreference — C++23 compiler support (and its
/20,/17, … siblings for earlier editions).
C++26
At the time of writing, C++26 is feature-complete at the WG21 committee level but not yet formally ISO-published — its contents are stable in the working draft but the ratification/publication process is still in progress, so treat everything below as the current committee consensus (subject to the standard process’s own final steps) rather than a shipped, ISO-numbered edition the way C++23 (ISO/IEC 14882:2024) is:
| Feature | What it adds |
|---|---|
Reflection ( |
Compile-time introspection over types/members — generate boilerplate (serializers, comparisons) without external code generators. |
Contracts ( |
Preconditions/postconditions as a first-class language feature, checkable at configurable severity levels. |
|
A unified, composable asynchrony model, generalizing beyond |
Erroneous behaviour |
A new category between well-defined and undefined behavior: a specific, diagnosable default result (e.g. reading an uninitialized |
Hardened standard library |
Optional, standardized run-time bounds/precondition checking in library functions (e.g. |
Because none of this is ISO-published yet, this section deliberately does not include worked, verified code examples for C++26 the way it does for C++23 — by the time C++26 ships and toolchains catch up, consult eel.is/c++draft (which tracks the latest working draft, C++26 included) and the compiler support pages above for what actually landed and where.
The C++ Standards Timeline
See Also
-
C: C Standards and C23 — WG14’s own release train, and the features C23 and C++ now spell the same way.