Daily bit(e) of C++ | Saturation arithmetic
Daily bit(e) of C++ #413, C++26 saturating arithmetic operations for integral types.
C++26 introduced a set of saturating arithmetic operations: addition, subtraction, multiplication, division and cast.
If the specified integral type cannot represent the result of the operation, the result is instead std::numeric_limits::min() or std::numeric_limits::max() (whichever is closer).
Nice 👍 wasn't aware of it