← Back to context

Comment by drysine

3 hours ago

>> platforms have very long agreed on twos-complement for negative integers. This even made it into the standard at some point, I believe.

>Only in C23. It was explicitly rejected for C++ 23 (and C++ 26 too, I believe).

It was added in C++20[0], see the note[1] "This is also known as two's complement representation".

[0] https://timsong-cpp.github.io/cppwp/n4868/basic.fundamental#...

[1] https://timsong-cpp.github.io/cppwp/n4868/basic.fundamental#...