Boost logo

Boost :

Subject: Re: [boost] Is there interest in portable integer overflow detection, with policy based handling?
From: Ben Robinson (cppmaven_at_[hidden])
Date: 2012-02-23 00:11:00


On Wed, Feb 22, 2012 at 11:37 AM, Robert Ramey <ramey_at_[hidden]> wrote:

> ... How is this resolved? To take a pathological case:
>
> unsigned int x = std::numeric_limits<unsigned int>::max();
> x = x / (-1);
>
> Will this throw? or fail at compile time, or what?
>
> Robert Ramey
>
> You are absolutely correct. I am not sure how I missed that corner case
considering that I have the negation operator, and multiplication by -1
are accounted for. I will write additional unit tests and post a fix
shortly.

Providing valuable feedback is why I post to the Boost community.

Thank you,

Ben Robinson

>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk