In practice: check before the operation with a helper, or use the builtins when you only target GCC and Clang. Build tests with -fsanitize=undefined (or -ftrapv) to catch signed overflow. Use unsigned types only when you really want modular arithmetic.
std::add_sat and the other saturating functions need -std=c++26 (c++2c); they are not available in a C++23 build such as this one.
__builtin_*_overflow are compiler extensions; MSVC has no direct equivalent, so cross-platform code uses the numeric_limits check.
C23 standardizes the same check as ckd_add, ckd_sub and ckd_mul in <stdckdint.h> (bool ckd_add(&result, a, b)). Clang (checked with Apple clang 17) accepts the header in C++ mode; C++26 adopts <stdckdint.h> (P3370R1), and libstdc++ 15+ provides it.
Narrow types are promoted to int before arithmetic: two uint16_t values multiplied can overflow int, which is undefined behavior.