From: Jonathan Wakely Date: Tue, 15 Dec 2020 15:39:58 +0000 (+0000) Subject: libstdc++: Do not define constexpr assertions for C++11 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f072d1021e3e80539afe58ba0019fafa9a0bb7a6;p=gcc.git libstdc++: Do not define constexpr assertions for C++11 There's no point even checking is_constant_evaluated() in C++11 mode, because the 'if' statement used for the assertion wouldn't be valid in a C++11 constexpr function anyway. libstdc++-v3/ChangeLog: * include/bits/c++config (__glibcxx_assert_1): Define as empty for C++11. --- diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 27302ed392e..155d0f46b16 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -684,7 +684,7 @@ namespace std #undef _GLIBCXX_HAS_BUILTIN -#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED +#if _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED && __cplusplus >= 201402L # define __glibcxx_assert_1(_Condition) \ if (__builtin_is_constant_evaluated()) \ { \