
11 Sep
2006
11 Sep
'06
12:29 a.m.
Does boost have anything like this? // Returns whether an operation will go out of bounds // given the values which will be passed to that operation template <typename Type> struct overflow_traits { bool neg(const Type & val); bool add(const Type & lhs, const Type & rhs); bool sub(const Type & lhs, const Type & rhs); bool mul(const Type & lhs, const Type & rhs); bool div(const Type & lhs, const Type & rhs); bool mod(const Type & lhs, const Type & rhs); //... };