Skip to content

Commit 2a1b893

Browse files
committed
Change constexpr to macros for suppress warnings
1 parent 4b01347 commit 2a1b893

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Helena/Util/Math.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef HELENA_UTIL_MATH_HPP
22
#define HELENA_UTIL_MATH_HPP
33

4+
#include <Helena/Platform/Processor.hpp>
45
#include <limits>
56
#include <bit>
67
#include <concepts>
@@ -25,9 +26,9 @@ namespace Helena::Util
2526
value |= value >> 8;
2627
value |= value >> 16;
2728

28-
if constexpr(std::numeric_limits<std::size_t>::digits == 64) {
29-
value |= value >> 32;
30-
}
29+
#if (HELENA_PROCESSOR_BITS == 64)
30+
value |= value >> 32;
31+
#endif // HELENA_PROCESSOR_BITS
3132

3233
return value + 1;
3334
}

0 commit comments

Comments
 (0)