What's "correct"? Given that you're dealing with an unsigned 8-bit value which uses modulo math, adding -1 and adding 255 are mathematically identical. So are adding 2^64 - 1 and adding 255.Quote:
Yes, the code compiles, but it is far from correct.
In the first case, -1 is converted to unsigned and 255 is added.
In the second case, the number is truncated and 255 is added.
If you don't actually want modulo-256 ring math, why are you using a CInt<uint8_t>?