Commit Graph

128 Commits

Author SHA1 Message Date
Robert Ramey
bb54d2bf8f factored checked::cast to move operations to compile time 2016-01-15 18:30:59 -08:00
Robert Ramey
89ec0c69f8 eliminated dependence upon boost/mpl/or_.hpp 2016-01-15 17:02:51 -08:00
Robert Ramey
5f71b0342a replaced typedef with using for better code reading consistency 2016-01-15 16:39:11 -08:00
Robert Ramey
18ecefb095 Tests pass with gcc !!! 2016-01-12 22:30:16 -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
01a3af5cc3 progress on case study on motor.c
added intersection to interval
improved
2016-01-04 10:06:43 -08:00
Robert Ramey
006c8147c3 Merge branch 'develop' 2015-12-31 15:21:06 -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
686a58b991 fixed test_left_shift_native 2015-12-28 09:55:15 -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
c991a84075 Merge branch 'develop'
# Conflicts:
#	doc/boostbook/HTML.manifest
#	doc/boostbook/native.xml
#	doc/boostbook/safe_numerics.xml
#	doc/html/bibliography.html
#	doc/html/checked_integer_arithmetic.html
#	doc/html/checked_result.html
#	doc/html/exception_policies.html
#	doc/html/exception_policy.html
#	doc/html/index.html
#	doc/html/integer.html
#	doc/html/introduction.html
#	doc/html/library_implementation.html
#	doc/html/numeric.html
#	doc/html/pending_issues.html
#	doc/html/promotion_policies.html
#	doc/html/promotion_policy.html
#	doc/html/rationale.html
#	doc/html/safe.html
#	doc/html/safe_numeric_concept.html
#	doc/html/tutorial/7.html
2015-12-22 08:54:35 -08:00
Robert Ramey
61a148cf5b added new files which were missing 2015-12-21 23:17:05 -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
cd620a8ec5 more complete documentation on eliminating runtime penalty 2015-12-17 17:46:05 -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
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
704f2fa48a updated proposal 2015-12-10 13:20:45 -08:00
Robert Ramey
36e320d987 Merge branch 'develop'
Conflicts:
	doc/boostbook/HTML.manifest
	doc/boostbook/automatic.xml
	doc/boostbook/native.xml
	doc/boostbook/safe_numerics.xml
	doc/html/bibliography.html
	doc/html/exception_policies.html
	doc/html/exception_policy.html
	doc/html/exception_safety.html
	doc/html/index.html
	doc/html/integer.html
	doc/html/introduction.html
	doc/html/numeric.html
	doc/html/pending_issues.html
	doc/html/promotion_policies.html
	doc/html/promotion_policy.html
	doc/html/rationale.html
	doc/html/safe.html
	doc/html/safe_numeric_concept.html
	doc/html/safe_unsigned_range.html
	doc/html/tutorial/7.html
2015-12-09 21:52:59 -08:00
Robert Ramey
e37b89a969 misc corrections in documentation
preparation of proposal for standard library
2015-12-09 21:50:09 -08:00
Robert Ramey
5f488b2040 update github read to properly display documentation 2015-12-07 23:06:19 -08:00
Robert Ramey
76f1ad225f html documentation generation 2015-12-07 22:54:41 -08:00
Robert Ramey
e03097dfa4 changed SAFECONSTEXPR to constexpr 2015-12-07 22:04:32 -08:00
Robert Ramey
96f829bfe4 updates of manual and examples 2015-12-07 21:46:39 -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
d72b625595 added new tests 2015-11-15 21:47:25 -08:00
Robert Ramey
82cb6e4b60 working on modulus 2015-11-15 20:24:17 -08:00
Robert Ramey
1336d0ddb0 added termination messages 2015-11-09 16:06:06 -08:00
Robert Ramey
7af42f2765 resolved division 2015-11-04 21:26:07 -08:00
Robert Ramey
370427c9f9 factor out test divide so more easily make test_divide_auto, test_divide_native, etc. 2015-09-12 13:26:57 -07: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
194d76a42e added tests for subtract and multiply automatic 2015-08-02 11:30:14 -07:00
Robert Ramey
79d480790a timplemented test for subtract automatic 2015-08-01 14:41:48 -07: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
f7117e7cf3 improved look of documentation 2015-07-30 12:42:31 -07:00
Robert Ramey
45357c63bf improved documentation formatting 2015-07-30 00:15:50 -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
64c3203ae1 Fixed compilation error in native
made automatic tests pass for addition
2015-07-20 12:33:29 -07:00
Robert Ramey
9bd6684c23 progress on automatic promotion policy 2015-07-18 15:38:05 -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
5ccff22568 first test of automatic promotion policy 2015-07-05 14:10:00 -07:00
Robert Ramey
78111d12e8 attempt to move pointer to common ancestor 2015-07-04 10:04:49 -07:00
Robert Ramey
bb96ebfc14 Moved policies implementation to development 2015-07-03 22:40:22 -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