395 Commits

Author SHA1 Message Date
Robert Ramey
c46d7a33fa Merge pull request #140 from grafikrobot/modular
Add support for modular build structure.
2024-08-18 11:52:27 -07:00
Rene Rivera
dc8e70a190 Update build deps. 2024-08-07 23:48:42 -05:00
Rene Rivera
79b7991928 Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:24 -05:00
Rene Rivera
63c98aa451 Update copyright dates. 2024-07-20 22:52:05 -05:00
Rene Rivera
8e982da288 Change all <source> references to <library>. 2024-07-20 19:42:32 -05:00
Rene Rivera
2b6dea32b7 Bump B2 require to 5.2 2024-06-14 11:33:56 -05:00
Rene Rivera
4e7bb5c8b8 Add requires-b2 check to top-level build file. 2024-05-05 09:00:01 -05:00
Rene Rivera
1faf7c7d52 Add missing import-search for cconfig/predef checks. 2024-05-04 23:32:15 -05:00
Rene Rivera
40c1263a7e Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:15:59 -05:00
Rene Rivera
9ca6bab033 Make the library modular usable. 2024-03-11 08:38:17 -05:00
hgkjshegfskef
13ca3d6dd3 fix safe_format includes (#114)
std::numeric_limits requires <limits>

Co-authored-by: hgkjshegfskef <hgkjshegfskef@protonmail.com>
2022-06-06 18:22:59 -07:00
Peter Dimov
21a342e874 Add a Boost-friendly subproject case to CMakeLists 2021-06-04 22:00:53 +03:00
Robert Ramey
8459368fb4 Merge branch 'develop' of https://github.com/boostorg/safe_numerics into develop
* 'develop' of https://github.com/boostorg/safe_numerics:
  Make increment/decrement operators constexpr. (#102)
2021-05-23 15:58:09 -07:00
Eelis
52f61ba737 Make increment/decrement operators constexpr. (#102)
Fixes #101.
2021-05-23 15:57:33 -07:00
Robert Ramey
0eaf4c8149 fix issues and PRs 2021-05-23 15:56:56 -07:00
Robert Ramey
308e8592d7 added test_concept_integer 2021-05-18 00:21:08 -07:00
Robert Ramey
42a6cdd82b Regenerated Documentation.
Still pending - remove/remake concept SafeNumeric.
2021-05-16 18:49:31 -07:00
Robert Ramey
36dca408ce Rationalized concepts for Numeric and Integer. The concept integer not currently used. 2021-05-16 17:52:47 -07:00
Robert Ramey
bb216bf58e updates to support better concepts 2021-05-11 11:14:49 -07:00
Robert Ramey
6629424a7f Major implementation change: Only Numeric concept still exists. And that is almost all “optional” members. User interface is the same. 2021-05-08 15:05:50 -07:00
Sam Darwin
e15c54c3e2 add drone config [ci skip] (#100) 2021-01-22 11:42:17 -08:00
Robert Ramey
cb3f4406a8 “improved” implementation of ilog2. 2020-12-31 19:52:19 -08:00
Robert Ramey
ac0d4ec85b eliminate bogus compile time warning from gcc on assignment to smaller integer 2020-12-28 16:10:27 -08:00
Edward Diener
fdc3439e04 Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries whose minumum C++ standard compilation level is C++11 on up. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. (#97) 2020-12-16 00:09:11 -08:00
Robert Ramey
4bd5bb50c0 move github actions yml files to the correct directory 2020-12-15 20:15:20 -08:00
Robert Ramey
5fade94d90 add .github actions for continuous integration for posix and for windows systems. First try. 2020-12-15 18:24:57 -08:00
Robert Ramey
dea5a291b1 Added “inline” to all free standing functions. This is in response to an issue whereby including the same types in a library ends up producing multiple copies of the function. This only shows up when combinations of types are reused. This should fix the problem. BUT I can’t figure out a way to really test it. These changes pass all tests - but there is no “linking” test to show this specific problem.
Actually this raises the question about what a “header only” library really is.  When it gets included in multiple modules, it looks like the compiler/linker consolidates functions with the same type signature - thus conflicting with most persons idea of what “header only” should actually mean.  Food for thought.

It also raises the issue of “head only” libraries and “code bloat”.  By making sure everything is inline we are contributing to code bloat.  This really should/could be addressed with making “inline”  INLINE and defining it according to what kind output we want to produce (ie. executable, static library, shared library, etc.).  But of course that changes the API - another can of worms.
2020-12-15 11:04:31 -08:00
Robert Ramey
c3cfc5b6c8 corrected C++ syntax ambiguity with union. 2020-12-13 10:54:37 -08:00
Robert Ramey
a742337b94 adjusted Jam and CMake files to eliminate bogus tests failures in boost test matrix. 2020-11-10 10:59:12 -08:00
Robert Ramey
ab13c7bed4 update documentation 2020-11-07 09:19:36 -08:00
Robert Ramey
cbb4197a17 cleaned up definitions for constructors and casting operators
passes all tests and examples.
minor documentation fixes
2020-11-07 07:09:37 -08:00
Robert Ramey
c4b0d5fbb6 simplified safe<T> <-> T conversions.
fails test_rational only
2020-11-02 07:23:04 -08:00
Robert Ramey
75df037bc8 fixed various issues raised in mini-review.
a) streaming negative numbers into unsigned integers is now handled properly.
b) documentation improved/corrected to better show the relationship between policies and safe integer types
2020-10-16 21:16:26 -07:00
Robert Ramey
82d3be1cf4 documentation updates and corrections
due mostly to Andrzej Krzemieński
2020-10-14 06:11:35 -07:00
Giovanni Mascellani
ec2eb0fdcb Fix typo in copyright headers. (#85) 2020-10-14 05:13:36 -07:00
Andrzej Krzemieński
96a38192dc docs: fix namespace in introduction (#86)
* docs: fix namespace in introduction

* Docs: use naespace safe_numerics also in prose
2020-10-14 05:11:03 -07:00
Robert Ramey
3bf136ba8b Corrected error related to lower bound for ranges which are not zero 2020-06-24 22:11:52 -07:00
Robert Ramey
eb95b39873 Merge branch 'develop' of https://github.com/boostorg/safe_numerics into develop 2020-06-23 14:03:59 -07:00
Robert Ramey
34d0a2196d corrected error in safe_range where by minimum was fixed a zero
Improved implementation/definition of error_policies
added test for custom error policy
changed documentation in accordance with the above.
2020-06-23 14:00:31 -07:00
Robert Ramey
a5405dd4d9 Update README.md 2020-06-11 14:12:16 -07:00
Peter Dimov
25ea58bc4e Collapse configurations 2020-02-08 19:02:02 +02:00
Peter Dimov
dcac37849f Fix gcc 9; use higher gcc versions on arm64/ppc64le/s390x 2020-02-08 18:11:51 +02:00
Peter Dimov
3098896b3d Add gcc 9, clang 7, 8 to Travis; update for Xenial; add arm64/ppc64le/s390x jobs 2020-02-08 16:49:12 +02:00
Robert Ramey
9a765f565c cleaned up issues in type requirement issues for integer only operations. 2020-01-20 15:26:50 -08:00
Robert Ramey
dbd1b79a84 made changes in the hope of fixing failing tests for MSVC 14.1 compiler with default standard library. 2020-01-05 12:09:44 -08:00
Robert Ramey
94cbf67773 invoked extra warnings for b2 file boost-1.74.0.beta1 boost-1.74.0 boost-1.73.0.beta1 boost-1.73.0 2019-12-27 16:09:06 -08:00
Robert Ramey
35bedab3f6 fixed tests for checked_xor, checked_or, checked_add, and checked_and
made all checking of symmetries of test matrices occur at compile time via constexpr.
added -Wextra to warning switches.
2019-12-25 14:37:37 -08:00
Robert Ramey
d692eddd3d test all examples 2019-12-15 08:47:44 -08:00
Robert Ramey
3e83dc88ce fix examples so they can run without console input 2019-12-14 23:05:28 -08:00
Robert Ramey
4a7acbf040 recent changes provoked error in example93. Very interesting as this example was used as a “provably” correct stepper motor implementation in CPPCon 2018. Fixing this led to some changes in casting of checked numbers. Currently passing all tests/examples on my machine. 2019-12-13 16:40:57 -08:00