26 Nov
2018
26 Nov
'18
10:29 p.m.
AMDG On 11/26/2018 03:15 PM, Gavin Lambert via Boost wrote:
On 27/11/2018 09:40, Emil Dotchevski wrote:
This is not what unsigned is for. You should generally use signed ints even if the value can't be negative.
Why? Other than being less typing (which is, I think, the real mistake), what reason is there for this?
signed integer overflow has undefined behavior. unsigned integers wrap. This means that signed integers give the compiler more scope for optimization and/or runtime checks. In Christ, Steven Watanabe