aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-12-15 15:39:58 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-12-15 15:39:58 +0000
commitf072d1021e3e80539afe58ba0019fafa9a0bb7a6 (patch)
treee268748a8722c1c1cdae640783debbbb56d268c7
parent362303298ac4c1f93bda87535df2b726481d54bb (diff)
downloadgcc-f072d1021e3e80539afe58ba0019fafa9a0bb7a6.zip
gcc-f072d1021e3e80539afe58ba0019fafa9a0bb7a6.tar.gz
gcc-f072d1021e3e80539afe58ba0019fafa9a0bb7a6.tar.bz2
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.
-rw-r--r--libstdc++-v3/include/bits/c++config2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 27302ed..155d0f4 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()) \
{ \