Robert Ramey
5f47f4a418
corrections/improvements in handling interaction with non integer types
2016-03-02 12:26:33 -08:00
Robert Ramey
c068524b45
added support for integer <-> non-integer conversions - floating and double
2016-02-26 09:38:02 -08:00
Robert Ramey
bb54d2bf8f
factored checked::cast to move operations to compile time
2016-01-15 18:30:59 -08:00
Robert Ramey
5f71b0342a
replaced typedef with using for better code reading consistency
2016-01-15 16:39:11 -08:00
Robert Ramey
01a3af5cc3
progress on case study on motor.c
...
added intersection to interval
improved
2016-01-04 10:06:43 -08:00
Robert Ramey
de48936d0e
fixed problems with bitwise and shift operations
...
diminished dependence on mpl::if and others
made progress on getting trap policy working better
2015-12-28 09:45:20 -08: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
e03097dfa4
changed SAFECONSTEXPR to constexpr
2015-12-07 22:04:32 -08:00
Robert Ramey
004149ee1d
corrected implementation of safe shift operations in left/right native/automatic variations
...
added and updated tests for these operations
2015-12-04 15:15:28 -08:00
Robert Ramey
8c7884ba57
implemented compile time arithmetic for module
...
updated checked
added tests
passes all current tests
2015-12-02 15:58:19 -08:00
Robert Ramey
82cb6e4b60
working on modulus
2015-11-15 20:24:17 -08:00
Robert Ramey
7af42f2765
resolved division
2015-11-04 21:26:07 -08:00
Robert Ramey
1871e498f5
version of checked which works with automatic type promotion. Still more work to do:
...
a) remove min/max checks
b) make promotion policy select checked implementation via a table
2015-09-12 13:26:02 -07:00
Robert Ramey
5ed3f3a945
attempt to get division with automatic type promotion working
2015-09-05 17:16:19 -07:00
Robert Ramey
21178d2ea1
corrected error in multiply
2015-08-02 13:51:34 -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
2bf3699082
corrected errors in comparison
...
implemented compile time checking to eliminate redundant run time error checking
first cut with automatic promotion
2015-07-07 14:51:33 -07:00
Robert Ramey
f185d014f2
added in binary operations |, &, and ^
2015-07-03 15:30:54 -07:00
Robert Ramey
54617a8cca
implemented and tested shift operators
2015-07-03 13:48:26 -07:00
Robert Ramey
8df7e3bf2e
fixed multiply
2015-06-24 09:35:25 -07:00
Robert Ramey
2ebf9538d1
broke multiply and conversion
2015-06-23 15:16:04 -07:00
Robert Ramey
69d681727c
re-factored compare
...
updated test_compare
updated safe_compare.hp
2015-06-19 08:29:53 -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
9ba1617c4e
Implemented divide operations
...
updated test_add
2015-06-15 16:18:30 -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
ff4b3dca72
eliminated unused headers test_add.hpp, test_subtract.hp, etc.
...
The code in these haaders has been moved into test_add.cpp, test_subtract.cpp, etc.
2015-05-29 14:48:07 -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
273d32e4df
works for subtract and add
2015-02-22 14:48:30 -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
72fa8a1a28
temp commit
2014-07-06 13:34:33 -07:00