On Tuesday, 6 October 2020 at 12:24:56 UTC, Alaindevos wrote:
Is that the expected behavior of the programmer?
Opinions can differ. Feel free to elaborate.

It's expected behavior:

"If both operands are of integral types and an overflow or underflow occurs in the computation, wrapping will happen. For example, uint.max + 1 == uint.min, uint.min - 1 == uint.max, int.max + 1 == int.min, and int.min - 1 == int.max."

https://dlang.org/spec/expression.html#add_expressions

Reply via email to