Skip to content

Commit

Permalink
fixup! refactor(util): replace static_asserts with c++20 concepts `…
Browse files Browse the repository at this point in the history
…requires`
  • Loading branch information
Swiftb0y committed Aug 23, 2022
1 parent 44f3c76 commit bbd07d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ constexpr T math_clamp(T value, T min, T max) {
// to manually convert so they are aware of the conversion.
template<typename T>
// since we also want to this to work on size_t and ptrdiff_t, is_integer would be too strict.
requires std::is_arithmetic_v<T> && !std::is_floating_point_v<T> constexpr bool even(T value) {
requires(std::is_arithmetic_v<T> && !std::is_floating_point_v<T>) constexpr bool even(T value) {
return value % 2 == 0;
}

Expand Down

0 comments on commit bbd07d8

Please sign in to comment.