
On Tue, Feb 21, 2012 at 1:04 AM, Ben Robinson <cppmaven@gmail.com> wrote:
The implementation is complete, with 5 policies created (and users can always create and use more). The policies are:
ignore_overflow throw_overflow assert_overflow saturate_overflow nan_overflow
The implementation is fully portable, and it provides integer types which can be used like the builtin integers, except they will trigger their policy on an overflow.
Also, this library will integrate seamlessly with the Boost Constrained Value Library (contributed by Robert Kawulak).
Does this pique anyone's interest?
How does it relate to Boost.NumericConversion?
See http://www.boost.org/doc/libs/1_48_0/libs/numeric/conversion/doc/html/index....
--Beman
Boost.NumericConversion has some limitations with respect to overflow handling. The arguments to the handling policy only contain the type of overflow, and not the values, nor the mathematical operation which was attempted. Therefore, as I understand it, it is not possible to write a saturate_overflow, or periodic_overflow policy, for example. You can only
On Tue, Feb 21, 2012 at 5:01 AM, Beman Dawes <bdawes@acm.org> wrote: throw, assert, or ignore. Again this is my understanding. Boost.NumericConversion has some nice floating point to integer conversion capability. My library aims only at detecting integer overflow (positive and negative). Ben Robinson
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost