Correctness bug in TDPL

BULLSHIT-GENERATOR BULLSHIT at DELIVERY.COM
Sun Feb 10 12:08:35 PST 2013


On Friday, 13 May 2011 at 13:36:13 UTC, Andrei Alexandrescu wrote:
> On 5/13/11 3:25 AM, Timon Gehr wrote:
>> On p368 the CheckedInt struct does not check for overflow in 
>> the unary minus
>> operator.
>
> Unary minus never overflows. That being said, there is the 
> oddity that -x is x when x == int.min. Even in that case there 
> is no loss of information.
>
> Andrei

BULLSHIT



More information about the Digitalmars-d mailing list