Commit Graph

13 Commits

Author SHA1 Message Date
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
1490e9fe57 refactored to implement checked_result arithmetic - still some tests to fix 2018-03-13 15:04:16 -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
26372d4862 hardened up enable_if usage to diminish or eliminate un expected instantiations 2017-06-25 18:33:25 -07:00
Robert Ramey
39e8c30097 used enable if on constructor so that it only gets instantiated when passed an integer type.
before this change, it would get instantiated by is_convertible<T, safe<U>> for any type T which created a syntax error.
This problem appears with using rational<safe<int>> but passes tests now.
Switched casting operators back to implicit.  Having it explicit makes it safe types more unwieldy to use and breaks some examples.
2017-06-25 11:46:11 -07:00
Robert Ramey
bce3a5536e intermediate version
passes all tests
adds documentation of library internals
implements trap_exception for compile time guarantee for program correctness
still needs update to support the above for operations in addition to + and -
2015-12-15 10:21:08 -08: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
64c3203ae1 Fixed compilation error in native
made automatic tests pass for addition
2015-07-20 12:33:29 -07:00
Robert Ramey
5ccff22568 first test of automatic promotion policy 2015-07-05 14:10:00 -07:00
Robert Ramey
2a5c0e373c test0 not working
example6 not working
2015-06-25 08:44:38 -07:00
Robert Ramey
fcb107840b addition operator returns safe type - passes all current addition tests.
implemented policy design
implemented addition part of native policy
2015-02-16 21:06:40 -08:00
Robert Ramey
94eb08f587 changed test.cpp to test0.cpp to accommodated CMake quirk 2015-02-08 16:27:51 -08:00