libstdc++: Adjust value of __cpp_lib_constrained_equality for C++20
The P3379R0 bump to __cpp_lib_constrained_equality relates to changes that only affect std::expected, so there's no reason to define the updated value in C++20. This change restores the previous value (202403) for C++20, and only uses the new value (202411) for C++23 and later. Also remove the TODO comments, because I correctly predicted that the final value would be 202411. libstdc++-v3/ChangeLog: * include/bits/version.def (constrained_equality): Only define as 202411 for C++23 and later, use 202403 for C++20. * include/bits/version.h: Regenerate. * testsuite/20_util/expected/equality_constrained.cc: Remove TODO comment.
This commit is contained in:
parent
6fd19b2dbd
commit
bb323ec8fd
3 changed files with 13 additions and 3 deletions
|
@ -1273,7 +1273,12 @@ ftms = {
|
|||
ftms = {
|
||||
name = constrained_equality;
|
||||
values = {
|
||||
v = 202411; // FIXME: 202403 for P2944R3, ??? for P3379R0
|
||||
v = 202411;
|
||||
cxxmin = 23;
|
||||
extra_cond = "__glibcxx_three_way_comparison";
|
||||
};
|
||||
values = {
|
||||
v = 202403;
|
||||
cxxmin = 20;
|
||||
extra_cond = "__glibcxx_three_way_comparison";
|
||||
};
|
||||
|
|
|
@ -1406,11 +1406,16 @@
|
|||
#undef __glibcxx_want_constexpr_vector
|
||||
|
||||
#if !defined(__cpp_lib_constrained_equality)
|
||||
# if (__cplusplus >= 202002L) && (__glibcxx_three_way_comparison)
|
||||
# if (__cplusplus >= 202100L) && (__glibcxx_three_way_comparison)
|
||||
# define __glibcxx_constrained_equality 202411L
|
||||
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_constrained_equality)
|
||||
# define __cpp_lib_constrained_equality 202411L
|
||||
# endif
|
||||
# elif (__cplusplus >= 202002L) && (__glibcxx_three_way_comparison)
|
||||
# define __glibcxx_constrained_equality 202403L
|
||||
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_constrained_equality)
|
||||
# define __cpp_lib_constrained_equality 202403L
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !defined(__cpp_lib_constrained_equality) && defined(__glibcxx_want_constrained_equality) */
|
||||
#undef __glibcxx_want_constrained_equality
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#ifndef __cpp_lib_constrained_equality
|
||||
# error "Feature-test macro for constrained_equality missing in <expected>"
|
||||
#elif __cpp_lib_constrained_equality < 202411L // TODO: use final value
|
||||
#elif __cpp_lib_constrained_equality < 202411L
|
||||
# error "Feature-test macro for constrained_equality has wrong value"
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue