Skip to content
C++

C++ Versions Quick Reference

What each C++ standard added — C++11 through C++26 key features in one reference.

C++11 (Major Revolution)

cpp
Language:
  auto, decltype                     — type deduction
  range-based forfor (auto& x : v)
  move semantics, rvalue refs        — T&&, std::move, std::forward
  lambda expressions                 — [cap](args){ body }
  variadic templates                 — template<typename... Ts>
  initializer_list                   — {1, 2, 3}
  uniform initialization             — T x{val}
  nullptr                            — replaces NULL
  enum class                         — scoped enums
  constexpr (limited)                — compile-time functions
  noexcept                           — exception specification
  override, final                    — virtual overrides
  default, deleteexplicit special members
  delegating constructors
  in-class member initializers
  static_assert with message
  alignas, alignof
  thread_local

Library:
  std::thread, mutex, condition_variable, atomic
  std::unique_ptr, shared_ptr, weak_ptr
  std::function, bind
  std::tuple, tie
  std::array
  std::unordered_map, unordered_set
  std::chrono
  std::regex
  std::random
  std::begin/end (free functions)

C++14 (Refinement)

cpp
Language:
  Generic lambdas                    — [](auto x){}
  Lambda capture with init          — [x = std::move(y)]{}
  decltype(auto)                    — preserve reference qualifiers
  Variable templates                — template<T> constexpr T pi = ...
  Relaxed constexpr                 — loops, if/else in constexpr
  Binary literals                   — 0b1010'1100
  Digit separators                  — 1'000'000
  deprecated attribute              — [[deprecated("use X")]]

Library:
  std::make_unique
  std::exchange
  std::integer_sequence
  std::quoted

C++17 (Pragmatic Additions)

cpp
Language:
  Structured bindings               — auto [a, b] = pair
  if/switch init statements         — if (auto x = f(); x > 0)
  constexpr ifif constexpr (cond)
  Guaranteed copy elision           — prvalue never copies
  Fold expressions                  — (args + ...)
  Class template argument deduction — std::pair{1, 2}
  Inline variables                  — inline constexpr int k = 42;
  [[nodiscard]], [[maybe_unused]]
  __has_include

Library:
  std::optional, variant, any
  std::string_view
  std::filesystem
  Parallel algorithms               — std::execution::par
  std::pmr (polymorphic allocators)
  std::byte
  std::from_chars, to_chars
  std::clamp, std::gcd, std::lcm
  std::apply, std::invoke
  std::size, std::data, std::empty
  std::as_const
  std::inclusive_scan, exclusive_scan, reduce
  std::sample

C++20 (Major Again)

cpp
Language:
  Concepts                          — requires, concept keyword
  Coroutines                        — co_await, co_yield, co_return
  Modules                           — import std; module mylib;
  Ranges                            — std::ranges::, views::
  Abbreviated function templates    — void f(auto x)
  Spaceship operator <=>auto operator<=>() = default
  Consteval, constinit
  Lambda improvements (no capture needed for const)
  Template parameter lists in lambdas — []<typename T>(T x){}
  Designated initializers           — Point{.x=1, .y=2}
  using enum
  Conditional explicit
  char8_t

Library:
  std::span
  std::format                       — Python-style formatting
  std::jthread, stop_token          — cooperative cancellation
  std::latch, barrier, semaphore
  std::atomic_ref
  std::bit_cast, std::popcount, rotl/rotr
  std::endian
  std::midpoint, std::lerp
  std::to_address
  Ranges algorithms and views
  Calendar / timezone (std::chrono)
  std::source_location
  std::remove_cvref_t
  std::is_constant_evaluated()

C++23 (Quality of Life)

cpp
Language:
  Deducing thisexplicit object parameter
  if consteval                      — branch at evaluation time
  static operator[]                 — static subscript operator
  static operator()                 — static call operator
  auto(x) decay-copy syntax
  Multidimensional subscript        — a[i, j, k]

Library:
  std::print, std::println          — no-allocate printing
  std::expected                     — monadic error handling
  std::flat_map, flat_set           — sorted vector-backed maps
  std::mdspan                       — multidimensional span
  std::generator                    — coroutine generator
  std::ranges::to<Container>        — convert range to container
  std::views::chunk, slide, zip     — range adaptors
  std::stacktrace
  std::to_underlying                — enum to underlying type
  std::byteswap                     — byte reversal
  Monadic optional (.and_then, .or_else, .transform)
  std::unreachable()

C++26 (In Progress, 2026)

cpp
Language:
  Reflection                        — static introspection
  Contracts                         — pre/postconditions, assert
  Pack indexing                     — Ts...[I]
  Variadic friends

Library:
  std::execution (P2300)            — sender/receiver async model
  std::inplace_vector               — fixed-capacity vector
  std::hazard_pointer               — lock-free memory reclamation
  std::rcu                          — read-copy-update
  std::indirect, std::polymorphic   — value semantics for polymorphism
  std::task (coroutine task type)
  Linear algebra (linalg)

Feature Test Macros

cpp
// Check for specific features
#if __cpp_concepts >= 201907L       // concepts available
#if __cpp_coroutines >= 201902L     // coroutines available
#if __cpp_modules >= 201907L        // modules available
#if __cpp_lib_format >= 201907L     // std::format available
#if __cpp_lib_ranges >= 201911L     // ranges available

// Or check C++ version
#if __cplusplus >= 202002L          // C++20 or later
Edit on GitHub