Subject: Re: [boost] a safe integer library
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2015-12-10 13:44:44
Robert Ramey wrote:
> I've also made a proposal for the C++ Standards committee to include a
> simplified version of this library as part of he C++ standard.
> You can see the proposal at
I've had a quick look at this PDF. Some random thoughts:
- The "safe integer" solution that I've heard most about is Miscrosoft's,
which I don't think is one of those that you cite in your references.
- At the top of page 3 of your PDF there's an example where you square an
int8_t and assign the result to an int8_t, and say this can't overflow.
Either I'm missing something (which is quite possible!) or you meant to
assign to a wider result type.
- I suspect that in my code, the consequences of an exception that I
hadn't considered could be just as bad as an overflow that I'd not
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk