2 ms·
I meant in the sense that unsigned integers have C-specified defined behaviors for conditions like overflow that are undefined for signed integers. That said, i
by jandrewrogers 5y ago
I meant in the sense that unsigned integers have C-specified defined behaviors for conditions like overflow that are undefined for signed integers. That said, if you bothering to create these integers types (e.g. the common MAX sentinel idiom), their behavior is often fully defined. If you go crazy with metaprogramming, type inference, etc in recent C++, you can often verify at compile-time that these conditions will not occur across arithmetic operations, though this is a lot less trivial.