diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-04-30 20:32:05 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-04-30 21:58:45 +0100 |
commit | 3215d4f5b3d08e0087a88df9e155c779927ace1a (patch) | |
tree | cbf96b8c32112a8632eaa5549db68215d40c4c93 | |
parent | 7ddcd26ebb60a8a4b57330442631115cabb6ec22 (diff) | |
download | gcc-3215d4f5b3d08e0087a88df9e155c779927ace1a.zip gcc-3215d4f5b3d08e0087a88df9e155c779927ace1a.tar.gz gcc-3215d4f5b3d08e0087a88df9e155c779927ace1a.tar.bz2 |
libstdc++: Fix inconsistent feature test macros
The __cpp_lib_constexpr_string and __cpp_lib_semaphore feature test
macros are not defined consistently in <version> and the relevant header
for the feature.
libstdc++-v3/ChangeLog:
* include/bits/basic_string.h (__cpp_lib_constexpr_string):
Only define for C++17 and later.
* include/std/version (__cpp_lib_semaphore): Fix condition
to match the one in <semaphore>.
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/version | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 41d781c..fba7c6f 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 diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 09e67a4..ea0e18a 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -241,7 +241,7 @@ #if __cpp_lib_concepts # define __cpp_lib_ranges 201911L #endif -#if __cpp_lib_atomic_wait +#if __cpp_lib_atomic_wait || _GLIBCXX_HAVE_POSIX_SEMAPHORE # define __cpp_lib_semaphore 201907L #endif #define __cpp_lib_shift 201806L |