Hello, On 17/03/2025 11:22, Giuseppe D'Angelo wrote:
PS: I've noticed that I have already accidentally bumped the FTM for constexpr stable sort; that's a bug as these two last algorithms were not inculded. I can decrement it for the time being, then rebump it again?
I didn't get an answer to this... I'm attaching a patch to fix the status quo, so that at least we don't advertise the wrong FTM value. This can be reverted once the other two patches for the algorithms go in.
Thank you, -- Giuseppe D'Angelo
From 6c6323d3e95f3af51e68c48c877115efbec51db5 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo <giuseppe.dang...@kdab.com> Date: Wed, 26 Mar 2025 15:30:47 +0100 Subject: [PATCH] libstdc++: do not advertise full P2562R1 support P2562R1 ("constexpr Stable Sorting") adds constexpr to stable_sort, stable_partition and inplace_merge. However only the first is already implemented in libstdc++, so we shouldn't bump the feature-testing macro to the bumped C++26 value. This commit sets it to one less than the final value. Amends r15-7708-gff43f9853d3b10. libstdc++-v3/ChangeLog: * include/bits/version.def (constexpr_algorithms): Change the value of the feature-testing macro. * include/bits/version.h: Regenerate. * testsuite/25_algorithms/cpp_lib_constexpr.cc: Amend the check of the feature-testing macro. Signed-off-by: Giuseppe D'Angelo <giuseppe.dang...@kdab.com> --- libstdc++-v3/include/bits/version.def | 2 +- libstdc++-v3/include/bits/version.h | 4 ++-- libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def index 1468c0491b7..7ef60af39de 100644 --- a/libstdc++-v3/include/bits/version.def +++ b/libstdc++-v3/include/bits/version.def @@ -1117,7 +1117,7 @@ ftms = { ftms = { name = constexpr_algorithms; values = { - v = 202306; + v = 202305; cxxmin = 26; }; values = { diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h index f7c9849893d..a96ff49efa4 100644 --- a/libstdc++-v3/include/bits/version.h +++ b/libstdc++-v3/include/bits/version.h @@ -1257,9 +1257,9 @@ #if !defined(__cpp_lib_constexpr_algorithms) # if (__cplusplus > 202302L) -# define __glibcxx_constexpr_algorithms 202306L +# define __glibcxx_constexpr_algorithms 202305L # if defined(__glibcxx_want_all) || defined(__glibcxx_want_constexpr_algorithms) -# define __cpp_lib_constexpr_algorithms 202306L +# define __cpp_lib_constexpr_algorithms 202305L # endif # elif (__cplusplus >= 202002L) # define __glibcxx_constexpr_algorithms 201806L diff --git a/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc index 3f60e996115..3e5e55252fc 100644 --- a/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc @@ -23,7 +23,7 @@ #ifndef __cpp_lib_constexpr_algorithms # error "Feature-test macro for constexpr algorithms missing" #elif __cplusplus > 202302L -# if __cpp_lib_constexpr_algorithms < 202306L +# if __cpp_lib_constexpr_algorithms < 202305L # error "Feature-test macro for constexpr algorithms has wrong value" # endif #elif __cpp_lib_constexpr_algorithms < 201806L -- 2.34.1
smime.p7s
Description: S/MIME Cryptographic Signature