Commit Graph

21 Commits

Author SHA1 Message Date
Robert Ramey
e26f76e107 automatic - change variable name in order avoid spurious warnings
exception - comment out unused inline function in order to avoid duplicate symbols during linkage
test_add_native - remove workaround code for MSVC/mp11 issue with too many elements in tuple.  This should be fixed now in develop branch
put workaround code in notepad - just in case
test_range - remove unused variables to avoid spurious warning
2018-12-17 11:55:54 -08:00
Robert Ramey
1bdf30e2b2 clean up exception catching to suppress warnings.
sync up class and struct
2018-09-30 17:39:33 -07:00
Robert Ramey
0e25e2095b alter directory structure to comply with boost requirements 2018-08-16 11:03:38 -07:00
Robert Ramey
4153b7f58a Numerous changes to better handle floating point.
Turns out that these changes should also better position us to handle other underlying types - but we're not there yet.
Added example for composition with other types - example boost rational and boost multi precision
Added performance test using boost multi precision
Many other small corrections
2017-07-16 13:36:09 -07:00
Robert Ramey
86910466a8 Intermediate working version
Making way for checked_float, checked_money, etc

a) factoring checked into checked_integer etc.
b) moved some tests from test_z to official tests
c) added test_rational which tests interoperability with boost::rational
d) moved safe_range to safe_integer_range
2017-07-08 12:48:37 -07:00
Robert Ramey
6854782928 reversed decision to make casting explicit. It's implicit again. Making it explicit didn't solve any issues but caused a number of examples to fail requiring an explanation. Now It's back to the way it was. 2017-06-25 21:19:58 -07:00
Robert Ramey
a1ea2eda24 eliminated implicit conversion from safe type to any other type.
updated documentation accordingly
2017-06-23 22:13:44 -07:00
Robert Ramey
e5749b5b4a Resolving issues related to error policy - first cut. Passes all tests except shift / undefined behavior.
Still needs to be redone - but on the right track.
2017-05-25 11:01:24 -07:00
Robert Ramey
9b0a15e820 Made corrections so that automatic policy returns the smallest possible result.
fixed left/right shift, divide, modulus, and bitwise operations
2017-04-07 18:06:59 -07:00
Robert Ramey
80e17943ca improved explanation of divide by zero
refined type requirements for integer vs numeric
fixed bugs in safe literal
added acknowledgement to documentation
2017-01-16 12:14:38 -08:00
Robert Ramey
5f71b0342a replaced typedef with using for better code reading consistency 2016-01-15 16:39:11 -08:00
Robert Ramey
29cf7f3d12 progress on example 93 to demonstrate trapping all potential exceptions at compile time
removed constexpr from exception policies.
  this eliminates obstacle to gcc compilation which doesn't support constexpr throw
  unfortunately, all versions of gcc trip compiler fault so gcc not supported for now
safe_literal - make this an unsafe type since it doesn't have policies - this might change in the future
2016-01-11 11:01:15 -08:00
Robert Ramey
511046c972 fixed bitwise or / and
re fixed examples - still some checking to do
2016-01-09 22:37:57 -08:00
Robert Ramey
a98fdd1edb corrected bitwise & operator
backed out some previous changes
2016-01-09 15:23:48 -08:00
Robert Ramey
ced5ce83f4 implemented op= versions of binary operands
first cut of cpp example
fixed misc bugs
2015-12-31 15:14:29 -08:00
Robert Ramey
1bc0b94e65 changes to implement the following:
a) made trap_exception work
b) updated manual and examples to show how to use library to eliminate runtime penalty
c) added in safe_literal
d) made corrections of various types
2015-12-21 23:14:06 -08:00
Robert Ramey
bb737b4ead made changes to support correct handling of trap_exception
added accidentally deleted tests for left and right shift
changed print_type to recommendation
2015-12-15 14:19:24 -08:00
Robert Ramey
321c7bbba0 updated tests to be sure that n op safe<?> is covered - 2015-07-30 13:26:48 -07:00
Robert Ramey
0a5822c14d working version of automatic promotion policy.
(right now - only working in addition!)
More examples
More complete documentation
pending issue  - compile time trap
2015-07-29 13:55:57 -07:00
Robert Ramey
d60bdf1de7 Fleshing out documentation - still in progress
This lead to numerous small changes - which of course weren't so small
Added static asserts for some range construction / assignments.
Passing all tests.
2015-07-23 16:52:22 -07:00
Robert Ramey
9bd6684c23 progress on automatic promotion policy 2015-07-18 15:38:05 -07:00