aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/experimental/numeric
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/experimental/numeric')
-rw-r--r--libstdc++-v3/include/experimental/numeric5
1 files changed, 4 insertions, 1 deletions
diff --git a/libstdc++-v3/include/experimental/numeric b/libstdc++-v3/include/experimental/numeric
index 381ecf3..33e9731 100644
--- a/libstdc++-v3/include/experimental/numeric
+++ b/libstdc++-v3/include/experimental/numeric
@@ -88,9 +88,12 @@ inline namespace fundamentals_v2
return 0;
_Ct __r = __m2 / __detail::__gcd<make_unsigned_t<_Ct>>(__m2, __n2);
- if _GLIBCXX17_CONSTEXPR (is_signed_v<_Ct>)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++17-extensions" // if constexpr
+ if constexpr (is_signed_v<_Ct>)
if (__is_constant_evaluated())
return __r * __n2; // constant evaluation can detect overflow here.
+#pragma GCC diagnostic pop
bool __overflow = __builtin_mul_overflow(__r, __n2, &__r);
__glibcxx_assert(!__overflow);