Robert Ramey
97d2b6cf12
made transition from derived classes to usage of type alias
...
pending cast from safe type to primitive integer type
2015-06-27 09:58:53 -07:00
Robert Ramey
2a5c0e373c
test0 not working
...
example6 not working
2015-06-25 08:44:38 -07:00
Robert Ramey
2ebf9538d1
broke multiply and conversion
2015-06-23 15:16:04 -07:00
Robert Ramey
ba0040d512
Added in modulus operation and verified with tests.
...
This is a minor variation on divide
2015-06-17 09:31:29 -07:00
Robert Ramey
6c0365461b
Implemented multiply
...
test_multiply passes
2015-06-15 10:23:13 -07:00
Robert Ramey
00e39147a4
Resolve problems with documentation
...
a) missing concepts
b) missing examples
c) rationalized types
2015-06-10 22:46:58 -07:00
Robert Ramey
5eebc2f1a8
working tests add and subtract with policies
2015-06-08 13:15:37 -07:00
Robert Ramey
7299770bdf
miscellaaneous code clean up
...
added policies documentation
2015-06-02 22:42:39 -07:00
Robert Ramey
471f1b85ec
got test_checked to work.
...
This verifies error detection for instrinsic integers at both compile and run time
2015-05-29 13:06:45 -07:00
Robert Ramey
7ce25ab9c0
testing constexpr for calculation of compile time overflows.
...
Turns out that clang doesn't just overflow - it traps if there's an overflow - basically like safe<int> does at compile time.
Upshot is we have to trap overflows at compile time WITHOUT calculating them. In retrospect this is undefined behavior but no matter.
Next iteration will deal with this.
2015-03-12 18:18:08 -07:00
Robert Ramey
599debeace
passing all addition tests
2015-03-06 22:08:46 -08: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
0356bb1a3d
improved native policy
2015-02-08 16:26:41 -08:00
Robert Ramey
561efa82a8
latest version - problem with circular reference to limits.hpp
2014-08-31 15:06:36 -07:00
Robert Ramey
d5c921a55b
managed to get native.hpp to compile - but still have problems production a safe result
2014-07-11 14:46:31 -07:00
Robert Ramey
831231d9de
intermediate version - first look at policies
2014-07-04 08:49:57 -07:00
Robert Ramey
557ffc61ad
first cut at policies - not there yet
2014-07-01 13:31:25 -07:00
Robert Ramey
c2c093379d
adjustments to make test_conversion pass
...
All tests pass in Debug and Release!!!
2014-04-20 18:10:15 -07:00
Robert Ramey
da574497e5
working
...
test add
test cast
test compare
test conversion
test subtract
test multiply
2014-04-14 14:41:48 -07:00
Robert Ramey
12f5843f90
Fixed problems in testing addition operations
...
More carefully defined the concepts. That is the concept of the library is now clear:
Trap at either compile or runtime integer operations which yield a result which differs from the normal arithmetic result.
Pending on this check in:
a) only addition is fixed up so far
b) uses BOOST_TYPEOF... rather than decltype(... - final decision sill pending.
c) comments out some compile time checks which should be re-instated.
d) fixed tests so that they actually work!
2014-04-05 12:22:25 -07:00
Robert Ramey
050f6748b9
minor adjustments in tests from Clang testing
2014-02-11 14:37:31 -08:00
Robert Ramey
b9845327d1
eliminated redundant root directory
2013-11-04 11:44:56 -08:00