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

auto, lambdas, move semantics/rvalue references, nullptr, range-for, smart pointers, <thread>, variadic templates, constexpr.

C++14

2014

Generic lambdas, generalized constexpr, variable templates, std::make_unique.

C++17

2017

Structured bindings, if/switch with init, std::optional/variant/any, <filesystem>, fold expressions, guaranteed copy elision, std::string_view.

C++20

2020

Concepts, ranges, coroutines, modules, <⇒, std::span, std::format (spec only), consteval/constinit, std::jthread.

C++23

2023

std::print/std::println, std::expected, std::mdspan, std::flat_map, deducing this, if consteval, std::generator, multidimensional operator[].

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"):

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 (std::meta)

Compile-time introspection over types/members — generate boilerplate (serializers, comparisons) without external code generators.

Contracts (pre/post/contract_assert)

Preconditions/postconditions as a first-class language feature, checkable at configurable severity levels.

std::execution (P2300, "senders/receivers")

A unified, composable asynchrony model, generalizing beyond std::future/std::async (see Async, Futures, and Atomics).

Erroneous behaviour

A new category between well-defined and undefined behavior: a specific, diagnosable default result (e.g. reading an uninitialized int reliably yields a fixed sentinel pattern) instead of "anything can happen."

Hardened standard library

Optional, standardized run-time bounds/precondition checking in library functions (e.g. vector::operator[]), for a safety/performance trade-off projects can opt into explicitly.

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

timeline title C++ Standard Editions 1998 : C++98 : the STL, templates, exceptions 2003 : C++03 : defect-fix release 2011 : C++11 : auto, lambdas, move semantics, smart pointers 2014 : C++14 : generic lambdas, generalized constexpr 2017 : C++17 : structured bindings, optional/variant/any, filesystem 2020 : C++20 : concepts, ranges, coroutines, modules, spaceship operator 2023 : C++23 : print, expected, mdspan, flat_map, deducing this 2026? : C++26 : reflection, contracts, std::execution (not yet ISO-published)

See Also

  • C: C Standards and C23 — WG14’s own release train, and the features C23 and C++ now spell the same way.