public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6079] libstdc++: Do not define constexpr assertions for C++11
@ 2020-12-15 15:40 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-12-15 15:40 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

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())	\
      {						\


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-15 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 15:40 [gcc r11-6079] libstdc++: Do not define constexpr assertions for C++11 Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).