Rosen Penev
436cdf0a7e
Use std::enable_if_t and std::is_signed_v.
3 years ago
Kevin Backhouse
ddd7ccf722
Use std::is_signed and std::enable_if.
3 years ago
Luis Díaz Más
30bf563f4d
Update .clang-format file & apply clang-format to whole project
3 years ago
Rosen Penev
3a2309bfea
clang-tidy: replace typedef with using
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev
887b08b0b7
clang-tidy: range loop conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más
b17828b454
Use SPDX for licenses ( #2122 )
...
* Use SPDX identifier in header files
* Use SPDX identifier in rest of source files
* Fix usage of SPDX for files with 2 licenses
* Add global license file
* Fix compilation
3 years ago
Luis Díaz Más
db4ece70cc
gtest - remove wrapper which is not needed anymore
4 years ago
Robin Mills
d632988bbd
Massive code prolog cleanup.
4 years ago
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