From f072d1021e3e80539afe58ba0019fafa9a0bb7a6 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 15 Dec 2020 15:39:58 +0000 Subject: [PATCH] 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. --- libstdc++-v3/include/bits/c++config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) \ { \ -- 2.30.2