3 Commits (f69de0d0586978f35ec6464e786943b86b8ccd6c)

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