In February 2020, at the final meeting for
C++20 in
Prague, an overall plan for C++23 was adopted: planned features for C++23 were library support for
coroutines, a
modular standard library, executors, and networking. The first WG21 meeting focused on C++23 was intended to take place in
Varna in early June 2020, but was cancelled due to the
COVID-19 pandemic, as was the November 2020 meeting in
New York In the absence of face-to-face WG21 meetings, the following changes were applied after several virtual WG21 meetings, where they were approved by straw polls.
November 2020 The following were added after the virtual WG21 meeting of 9 November 2020, where they were approved by straw polls: • Literal suffixes for std::
size_t and the corresponding signed type • A member function for and , to check whether or not the string contains a given substring or character • A
stacktrace library (), based on
Boost.Stacktrace • A type trait • The header , for interoperability with
C atomics
February 2021 After the virtual WG21 meeting of 22 February 2021, following features are added where they were approved by straw polls: • Removing unnecessary empty parameter list from
lambda expressions. • Repairing input range adaptors and . • Relax the requirements for . • for classes that are derived from . • . • Conditionally borrowed ranges. • .
June 2021 After the summer 2021 ISO C++ standards plenary virtual meeting of June 2021, new features and defect reports were approved by straw polls: • Consteval if (). • Narrowing contextual conversions to . • Allowing duplicate attributes. • -based string-stream (). • and . • constexpr| for , , and . • Iterators pair constructors for (
stack) and (
queue). • Few changes of the ranges library: • Generalized and for arbitrary ranges. • Renamed to and new . • Relaxing the constraint on . • Removing constraint from concept . • Range constructor for . • Prohibiting and construction from nullptr|. • . • Improvements on . • Adding default arguments for 's forwarding constructor.
October 2021 After the autumn 2021 ISO C++ standards plenary virtual meeting of October 2021, new features and defect reports were approved by straw polls: • Non-literal variables, labels, and gotos in functions, but still ill-formed to evaluate them at compile-time. • Explicit this (computer programming)| object parameter. • Changes on character sets and encodings. • New preprocessors: and . Both directives were added to
C23 (C language update) and
GCC 12. • Allowing alias declarations in init-statement. • Overloading multidimensional subscript operator (e.g. ). • Decay copy in language: or . • Changes in text formatting library: • Fixing locale handling in chrono formatters. • Use of forwarding references in format arguments to allow -like types. • Addition of type alias which is equivalent to . • Changes in ranges library: • Refined definition of a view. • Replacing function template with alias templates , , and customization point object . • range adaptor family: • • • (and being equivalent to ) • (and being equivalent to ) • . •
Monadic operations for . • Member function template . • Printing volatile (computer programming)| pointers (). • . • Heterogeneous erasure overloads for associative containers. • Every specialization of and is trivially copyable. • Adding conditional specifications to . • Revamped specification and use of integer-class types. • Clarify
C headers. "The headers are
not useful in code that is
only required to be valid C++. Therefore, the C headers should be provided by the C++ standard library as a fully-supported, not deprecated part, but they should also be discouraged for use in code that is not polyglot interoperability code. [..] This proposal makes the C headers no longer deprecated, so there is no formal threat of future removal. The effective discouragement to use the C headers in pure C++ code is now spelled out explicitly as normative discouragement."
February 2022 After the virtual WG21 meeting of 7 February 2022, the following features are added where they were approved by straw polls: • Allowed attributes on the function call operator of a lambda • • for cmath and cstdlib • Function to mark
unreachable code • • A type trait to detect reference binding to temporary • Making • Pipe support for user-defined range adaptors • , and • • Windowing range adaptors: and •
July 2022 After the virtual WG21 meeting of 25 July 2022, the following features and defect reports are added where they were approved by straw polls: • Made rewriting equality in expressions less of a breaking change. • Reverted the deprecation of bitwise assignment to variables. • Added the preprocessor directive. • Removed non-encodable wide
character literals and multicharacter wide character literals. • Allowed
labels to appear at the end of compound statements. • Added
escape sequences delimited with curly braces for octal and hexadecimal numbers and universal character names. • Allowed functions to never be constant expressions. • Simplified some implicit move rules from
C++20 and allowed implicit move when returning an rvalue reference. • Add a way to specify
unicode characters by name. For example, {{cpp|U'\N{LATIN CAPITAL LETTER A WITH MACRON}' // Equivalent to U'\u0100'}} • Allowed operators in C and C++| and lambdas to be static (keyword)|. • Allowed the
this pointer and
references of unknown origin to appear in constant expressions. • Allowed implementations to define extended
floating-point types in addition to the three standard floating-point types. Added the type aliases std::float16_t, std::float32_t, std::float64_t, std::float128_t,
std::bfloat16_t for these extended types accessible through the header , their corresponding literal suffixes f16 f32 f64 f128 bf16or F16 F32 F64 F128 BF16 and added overloads to various standard library functions that take floats as arguments. • Added the attribute which allows the compiler to assume the provided expression is true to allow optimizations. • Made support for
UTF-8 source files mandatory, providing a portable encoding for source files. • Allowed arrays of and to be initialized with UTF-8
string literals. • Removed the requirement that wchar_t| can encode all characters of the extended character set, in effect allowing UTF-16 to be used for wide string literals. • Added std::mdspan, a multidimensional array view analogous to std::span. • and were added to the standard library. • Added the and functions for printing formatted text to
stdout. • Provide the named modules and for importing the standard library. • Added support for exclusive mode fstreams, analogous to the "x" flag in
fopen. • Allowed std::format to handle ranges, tuples, and other containers. • Added std::forward_like. • Made std::string::substr use
move semantics. • Added which implements a coroutine generator that models • , , , , . • Added new algorithms: , , and ranges fold algorithms. • Made std::tuple compatible with other
tuple-like objects. • Explicit lifetime management for implicit-lifetime types. • Made std::bitset and integral overloads of std::to_chars and std::from_chars -compatible. • Adding move-only types support for comparison concepts. • Ranges iterators as inputs to non-ranges algorithms. • Relaxing range adaptors to allow for move-only types.
November 2022 After the hybrid WG21 meeting of 7 November 2022, the following features and defect reports are added where they were approved by straw polls: • Allowed to be . • Allowed and thread-local storage| variables to appear in functions if they are usable in constant expressions. • consteval| propagates upwards, that is, certain existing functions become functions when those functions can already only be invoked during compile time. • Extended the lifetime of temporaries that appear in the
for-range-initializer of a range-based loop to cover the entire loop. • Reverted the deprecation of (all, not just bitwise)
compound assignment to variables. •
Monadic functions for . • Synchronize the output of with the underlying stream if the native Unicode API is used.
February 2023 After the final hybrid WG21 meeting of 6-11 February 2023, the following features and defect reports are added where they were approved by straw polls: • Referencing the Unicode Standard. • Stashing stashing iterators for proper flattening. • views::enumerate • making multi-param constructors of views explicit • relaxing ranges just a smidge • escaping improvements in std::format • improving std::format's width estimation • std::format fill character allowances • formatting thread::id and stacktrace • A type trait std::is_implicit_lifetime • std::common_reference_t of std::reference_wrapper should be a reference type • disallowing user specialization of std::allocator_traits • std::pmr::generator • deprecating std::numeric_limits::has_denorm • std::barrier's phase completion guarantees ==References==