Skip to content

Commit d27160a

Browse files
committed
[libc++] Adds __cpp_lib_three_way_comparison FTM.
The paper P0768R1 Library Support for the Spaceship (Comparison) Operator did not add a feature-test macro. This omission has been corrected in P1353R0 Missing Feature Test Macros This enables the FTM for P0768R1 Fixes: #73953
1 parent fcfc15b commit d27160a

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

libcxx/docs/Status/Cxx20Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"`P1236R1 <https://wg21.link/P1236R1>`__","CWG","Alternative Wording for P0907R4 Signed Integers are Two's Complement","San Diego","* *",""
7979
"`P1248R1 <https://wg21.link/P1248R1>`__","LWG","Remove CommonReference requirement from StrictWeakOrdering (a.k.a Fixing Relations)","San Diego","|Complete|","13.0"
8080
"`P1285R0 <https://wg21.link/P1285R0>`__","LWG","Improving Completeness Requirements for Type Traits","San Diego","* *",""
81-
"`P1353R0 <https://wg21.link/P1353R0>`__","CWG","Missing feature test macros","San Diego","* *",""
81+
"`P1353R0 <https://wg21.link/P1353R0>`__","CWG","Missing feature test macros","San Diego","|In Progress|",""
8282
"","","","","","",""
8383
"`P0339R6 <https://wg21.link/P0339R6>`__","LWG","polymorphic_allocator<> as a vocabulary type","Kona","|Complete|","16.0"
8484
"`P0340R3 <https://wg21.link/P0340R3>`__","LWG","Making std::underlying_type SFINAE-friendly","Kona","|Complete|","9.0"

libcxx/include/version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ __cpp_lib_string_view 201803L <string> <string
228228
__cpp_lib_submdspan 202306L <mdspan>
229229
__cpp_lib_syncbuf 201803L <syncstream>
230230
__cpp_lib_text_encoding 202306L <text_encoding>
231-
__cpp_lib_three_way_comparison 201907L <compare>
231+
__cpp_lib_three_way_comparison 201711L <compare>
232232
__cpp_lib_to_address 201711L <memory>
233233
__cpp_lib_to_array 201907L <array>
234234
__cpp_lib_to_chars 202306L <charconv>
@@ -438,7 +438,7 @@ __cpp_lib_within_lifetime 202306L <type_traits>
438438
# if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM)
439439
# define __cpp_lib_syncbuf 201803L
440440
# endif
441-
// # define __cpp_lib_three_way_comparison 201907L
441+
// # define __cpp_lib_three_way_comparison 201711L
442442
# define __cpp_lib_to_address 201711L
443443
# define __cpp_lib_to_array 201907L
444444
# define __cpp_lib_type_identity 201806L

libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// Test the feature test macros defined by <compare>
1717

1818
/* Constant Value
19-
__cpp_lib_three_way_comparison 201907L [C++20]
19+
__cpp_lib_three_way_comparison 201711L [C++20]
2020
*/
2121

2222
#include <compare>
@@ -46,8 +46,8 @@
4646
# ifndef __cpp_lib_three_way_comparison
4747
# error "__cpp_lib_three_way_comparison should be defined in c++20"
4848
# endif
49-
# if __cpp_lib_three_way_comparison != 201907L
50-
# error "__cpp_lib_three_way_comparison should have the value 201907L in c++20"
49+
# if __cpp_lib_three_way_comparison != 201711L
50+
# error "__cpp_lib_three_way_comparison should have the value 201711L in c++20"
5151
# endif
5252
# else // _LIBCPP_VERSION
5353
# ifdef __cpp_lib_three_way_comparison
@@ -61,8 +61,8 @@
6161
# ifndef __cpp_lib_three_way_comparison
6262
# error "__cpp_lib_three_way_comparison should be defined in c++23"
6363
# endif
64-
# if __cpp_lib_three_way_comparison != 201907L
65-
# error "__cpp_lib_three_way_comparison should have the value 201907L in c++23"
64+
# if __cpp_lib_three_way_comparison != 201711L
65+
# error "__cpp_lib_three_way_comparison should have the value 201711L in c++23"
6666
# endif
6767
# else // _LIBCPP_VERSION
6868
# ifdef __cpp_lib_three_way_comparison
@@ -76,8 +76,8 @@
7676
# ifndef __cpp_lib_three_way_comparison
7777
# error "__cpp_lib_three_way_comparison should be defined in c++26"
7878
# endif
79-
# if __cpp_lib_three_way_comparison != 201907L
80-
# error "__cpp_lib_three_way_comparison should have the value 201907L in c++26"
79+
# if __cpp_lib_three_way_comparison != 201711L
80+
# error "__cpp_lib_three_way_comparison should have the value 201711L in c++26"
8181
# endif
8282
# else // _LIBCPP_VERSION
8383
# ifdef __cpp_lib_three_way_comparison

libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
__cpp_lib_submdspan 202306L [C++26]
211211
__cpp_lib_syncbuf 201803L [C++20]
212212
__cpp_lib_text_encoding 202306L [C++26]
213-
__cpp_lib_three_way_comparison 201907L [C++20]
213+
__cpp_lib_three_way_comparison 201711L [C++20]
214214
__cpp_lib_to_address 201711L [C++20]
215215
__cpp_lib_to_array 201907L [C++20]
216216
__cpp_lib_to_chars 201611L [C++17]
@@ -4309,8 +4309,8 @@
43094309
# ifndef __cpp_lib_three_way_comparison
43104310
# error "__cpp_lib_three_way_comparison should be defined in c++20"
43114311
# endif
4312-
# if __cpp_lib_three_way_comparison != 201907L
4313-
# error "__cpp_lib_three_way_comparison should have the value 201907L in c++20"
4312+
# if __cpp_lib_three_way_comparison != 201711L
4313+
# error "__cpp_lib_three_way_comparison should have the value 201711L in c++20"
43144314
# endif
43154315
# else // _LIBCPP_VERSION
43164316
# ifdef __cpp_lib_three_way_comparison
@@ -5903,8 +5903,8 @@
59035903
# ifndef __cpp_lib_three_way_comparison
59045904
# error "__cpp_lib_three_way_comparison should be defined in c++23"
59055905
# endif
5906-
# if __cpp_lib_three_way_comparison != 201907L
5907-
# error "__cpp_lib_three_way_comparison should have the value 201907L in c++23"
5906+
# if __cpp_lib_three_way_comparison != 201711L
5907+
# error "__cpp_lib_three_way_comparison should have the value 201711L in c++23"
59085908
# endif
59095909
# else // _LIBCPP_VERSION
59105910
# ifdef __cpp_lib_three_way_comparison
@@ -7764,8 +7764,8 @@
77647764
# ifndef __cpp_lib_three_way_comparison
77657765
# error "__cpp_lib_three_way_comparison should be defined in c++26"
77667766
# endif
7767-
# if __cpp_lib_three_way_comparison != 201907L
7768-
# error "__cpp_lib_three_way_comparison should have the value 201907L in c++26"
7767+
# if __cpp_lib_three_way_comparison != 201711L
7768+
# error "__cpp_lib_three_way_comparison should have the value 201711L in c++26"
77697769
# endif
77707770
# else // _LIBCPP_VERSION
77717771
# ifdef __cpp_lib_three_way_comparison

libcxx/utils/generate_feature_test_macro_components.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,8 @@ def add_version_header(tc):
12361236
},
12371237
{
12381238
"name": "__cpp_lib_three_way_comparison",
1239-
"values": {"c++20": 201907},
1239+
"values": {"c++20": 201711},
1240+
# {"c++20": 201711} # P1614R2 The Mothership has Landed (see P1902R1 Missing feature-test macros 2017-2019)
12401241
"headers": ["compare"],
12411242
"unimplemented": True,
12421243
},

0 commit comments

Comments
 (0)