Integer hygiene

Fixed widths, safe compares, saturating arithmetic.

<cstdint> fixed-width types become default vocabulary; brace initialization rejects narrowing. Signed/unsigned comparison remains a trap you dodge by convention.

std::uint32_t flags{};
int16_t level{init};   // error if init narrows

Binary literals and digit separators make bit-level constants readable.

constexpr auto mask = 0b1010'0000'1111'0000u;

std::clamp and gcd/lcm fill arithmetic gaps; if constexpr lets numeric templates branch on signedness cleanly.

The hygiene release: std::cmp_less family compares mixed signs correctly, std::ssize returns signed sizes, midpoint avoids overflow, <bit> gives checked power-of-two math.

if (std::cmp_less(signed_index, container.size())) ...   // no sign surprise
auto mid = std::midpoint(lo, hi);                          // overflow-safe

std::to_underlying for enums, uz/z literals for size types, std::byteswap for endianness.

for (auto i = 0uz; i < v.size(); ++i) ...   // size_t literal (C++23)

Saturating arithmetic: add_sat, sub_sat, mul_sat, div_sat and saturate_cast — clamping math without hand-written branches, straight from the DSP/embedded wishlist.

auto level = std::add_sat<std::uint8_t>(cur, delta);   // caps at 255
C++29direction · not adopted

Direction: interop with C23's _BitInt and wider checked-arithmetic facilities are under discussion.

C++26 per the final working draft; C++29 rows are proposals and direction, not adopted features.