Boost logo

Boost Users :

From: Troels Arvin (troels_at_[hidden])
Date: 2006-10-31 17:33:22


On Mon, 30 Oct 2006 15:38:50 -0800, Delfin Rojas wrote:
>> I'm wondering: Does Boost have a class like Microsoft's SafeInt?
>> (Portable, of course.)
>>
>> If not: Does anyone have some good guidelines on how to make code (on
>> Linux) integer overflow safe? (Here: Safe == exception
>> generating.) I'm thinking specialized compilers, etc.
>>
>
> http://www.boost.org/libs/numeric/conversion/doc/numeric_cast.html

So the answer to my first question is that there is no SafeInt-like class
in Boost?

About the link to numeric_cast:
But that doesn't catch cases where -e.g.- an integer is incremented beyond
its limit (overflowing), right?

-- 
Regards,
Troels Arvin <troels_at_[hidden]>
http://troels.arvin.dk/

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net