public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-9785] libstdc++: Fix inconsistent feature test macro
@ 2021-04-30 21:13 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-04-30 21:13 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:0244ef49817eb5f46ce432bf4cc91bbfd63c881b

commit r10-9785-g0244ef49817eb5f46ce432bf4cc91bbfd63c881b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Apr 30 20:32:05 2021 +0100

    libstdc++: Fix inconsistent feature test macro
    
    The __cpp_lib_constexpr_string feature test macro is not defined
    consistently in <version> and <string>.
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/basic_string.h (__cpp_lib_constexpr_string):
            Only define for C++17 and later.
    
    (cherry picked from commit 3215d4f5b3d08e0087a88df9e155c779927ace1a)

Diff:
---
 libstdc++-v3/include/bits/basic_string.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index f51ec6b60cf..2125df2d476 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -55,7 +55,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #if __cplusplus == 201703L
 // Support P0426R1 changes to char_traits in C++17.
 # define __cpp_lib_constexpr_string 201611L
-#else
+#elif __cplusplus > 201703L
 // Also support P1032R1 in C++20 (but not P0980R1 yet).
 # define __cpp_lib_constexpr_string 201811L
 #endif


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

only message in thread, other threads:[~2021-04-30 21:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 21:13 [gcc r10-9785] libstdc++: Fix inconsistent feature test macro 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).