[gcc r11-6079] libstdc++: Do not define constexpr assertions for C++11
Jonathan Wakely
redi@gcc.gnu.org
Tue Dec 15 15:40:53 GMT 2020
https://gcc.gnu.org/g:f072d1021e3e80539afe58ba0019fafa9a0bb7a6
commit r11-6079-gf072d1021e3e80539afe58ba0019fafa9a0bb7a6
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Dec 15 15:39:58 2020 +0000
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:
---
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()) \
{ \
More information about the Libstdc++-cvs
mailing list