Implement correctly ranged return types from safe operations. Before, anything checked at runtime returned the whole range for the underlying variable.

Still pending and, or and xor operations
This commit is contained in:
Robert Ramey
2017-04-04 08:57:02 -07:00
parent 281284d8aa
commit 3794a5517f
27 changed files with 1102 additions and 1074 deletions

View File

@@ -22,7 +22,7 @@ bool test2(){
using namespace boost::numeric;
checked_result<int> x1(0);
assert(0 == x1);
checked_result<int> x2(exception_type::overflow_error, "exception message");
checked_result<int> x2(exception_type::positive_overflow_error, "exception message");
assert(! x2.no_exception());
return true;
}