summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/math.hpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/compat/math.hpp b/compat/math.hpp
index d5b628c4..8df83cc3 100644
--- a/compat/math.hpp
+++ b/compat/math.hpp
@@ -62,15 +62,11 @@ constexpr inline T ceil(T x)
{
if (std::is_constant_evaluated())
{
-#ifdef __GNUG__
- return __builtin_ceil(x);
-#else
- const auto x0 = uint64_t(x);
+ const auto x0 = int64_t(x);
if (x > x0)
- return T(x0 + uint64_t(1));
+ return T(x0 + int64_t(1));
else
return x0;
-#endif
}
else
return std::ceil(x);