Small language features (C++23)
uz suffix, auto(x), alias-declarations in init-statements, labels at block end, declaration-order layout, narrowing to bool, equality-rewrite fix, range-for lifetime fix.
Connected features
No dependency lines — on the map this feature hangs off C++23 by a star edge.
Papers
8 · Virtual 2020 → Kona 2022Adds the z/uz literal suffixes for ptrdiff_t/size_t.
Allows narrowing conversions to bool in if constexpr, static_assert and similar conditions (if constexpr (flags & mask)).
Mandates that non-static data members are laid out in declaration order (removes the access-specifier reordering freedom).
Adds auto(x) and auto{x} to produce a decayed prvalue copy of an expression.
Allows an alias-declaration as the init-statement of if, switch and for.
Allows a label before the closing brace of a compound statement, as in C23.
Fixes rewritten-candidate rules so a class declaring both operator== and operator!= keeps its old meaning instead of becoming ambiguous (DR).
Extends the lifetime of every temporary in the range-initializer of a range-based for, fixing for (auto x : f().items()).