3 Commits (cc4d56dec1f8dba1fd38c331567dfee22d85e6bb)

Author SHA1 Message Date
Dan Čermák 2dacb19933 [safe_op] Add Safe::abs(), calculates absoulte value without UB
Add a drop-in replacement for std::abs which never produces
negative values and thereby never invokes undefined behavior.
7 years ago
Dan Čermák 06ec1e6984 [safe_op] Refactored addition overflow checks using functions only
- templated structs were not required, SFINAE works for functions too
  => use instead, removes some unneeded code
- fix non-usage of builtins with clang
- adjust unit tests
7 years ago
Dan Čermák 3b3283e37d Added unit tests for new overflow checking addition functions 8 years ago