Skip to content

Commit 6038077

Browse files
[libc++] Bump __cpp_lib_constexpr_algorithms for P2562R1 in C++26 (llvm#132075)
Completes P2562R1.
1 parent a5c7f81 commit 6038077

File tree

8 files changed

+18
-9
lines changed

8 files changed

+18
-9
lines changed

libcxx/docs/FeatureTestMacroTable.rst

+2
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ Status
416416
---------------------------------------------------------- -----------------
417417
``__cpp_lib_bitset`` ``202306L``
418418
---------------------------------------------------------- -----------------
419+
``__cpp_lib_constexpr_algorithms`` ``202306L``
420+
---------------------------------------------------------- -----------------
419421
``__cpp_lib_constexpr_new`` ``202406L``
420422
---------------------------------------------------------- -----------------
421423
``__cpp_lib_constrained_equality`` *unimplemented*

libcxx/docs/ReleaseNotes/21.rst

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Implemented Papers
4242
- P0767R1: Deprecate POD (`Github <https://github.com/llvm/llvm-project/issues/104013>`__)
4343
- P1361R2: Integration of chrono with text formatting (`Github <https://github.com/llvm/llvm-project/issues/100014>`__)
4444
- P2255R2: A type trait to detect reference binding to temporary (implemented the type traits only) (`Github <https://github.com/llvm/llvm-project/issues/105180>`__)
45+
- P2562R1: ``constexpr`` Stable Sorting (`Github <https://github.com/llvm/llvm-project/issues/105360>`__)
4546

4647
Improvements and New Features
4748
-----------------------------

libcxx/docs/Status/Cxx2cPapers.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"`P2497R0 <https://wg21.link/P2497R0>`__","Testing for success or failure of ``<charconv>`` functions","2023-06 (Varna)","|Complete|","18",""
33
"`P2592R3 <https://wg21.link/P2592R3>`__","Hashing support for ``std::chrono`` value classes","2023-06 (Varna)","","",""
44
"`P2587R3 <https://wg21.link/P2587R3>`__","``to_string`` or not ``to_string``","2023-06 (Varna)","","",""
5-
"`P2562R1 <https://wg21.link/P2562R1>`__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Partial|","20",""
5+
"`P2562R1 <https://wg21.link/P2562R1>`__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Complete|","21",""
66
"`P2545R4 <https://wg21.link/P2545R4>`__","Read-Copy Update (RCU)","2023-06 (Varna)","","",""
77
"`P2530R3 <https://wg21.link/P2530R3>`__","Hazard Pointers for C++26","2023-06 (Varna)","","",""
88
"`P2538R1 <https://wg21.link/P2538R1>`__","ADL-proof ``std::projected``","2023-06 (Varna)","|Complete|","18",""

libcxx/include/version

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ __cpp_lib_chrono_udls 201304L <chrono>
6060
__cpp_lib_clamp 201603L <algorithm>
6161
__cpp_lib_complex_udls 201309L <complex>
6262
__cpp_lib_concepts 202002L <concepts>
63-
__cpp_lib_constexpr_algorithms 201806L <algorithm> <utility>
63+
__cpp_lib_constexpr_algorithms 202306L <algorithm> <utility>
64+
201806L // C++20
6465
__cpp_lib_constexpr_bitset 202207L <bitset>
6566
__cpp_lib_constexpr_charconv 202207L <charconv>
6667
__cpp_lib_constexpr_cmath 202202L <cmath> <cstdlib>
@@ -536,6 +537,8 @@ __cpp_lib_void_t 201411L <type_traits>
536537
# undef __cpp_lib_bind_front
537538
# define __cpp_lib_bind_front 202306L
538539
# define __cpp_lib_bitset 202306L
540+
# undef __cpp_lib_constexpr_algorithms
541+
# define __cpp_lib_constexpr_algorithms 202306L
539542
# if !defined(_LIBCPP_ABI_VCRUNTIME)
540543
# define __cpp_lib_constexpr_new 202406L
541544
# endif

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/* Constant Value
1919
__cpp_lib_clamp 201603L [C++17]
2020
__cpp_lib_constexpr_algorithms 201806L [C++20]
21+
202306L [C++26]
2122
__cpp_lib_default_template_type_for_algorithm_values 202403L [C++26]
2223
__cpp_lib_freestanding_algorithm 202311L [C++26]
2324
__cpp_lib_parallel_algorithm 201603L [C++17]
@@ -380,8 +381,8 @@
380381
# ifndef __cpp_lib_constexpr_algorithms
381382
# error "__cpp_lib_constexpr_algorithms should be defined in c++26"
382383
# endif
383-
# if __cpp_lib_constexpr_algorithms != 201806L
384-
# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++26"
384+
# if __cpp_lib_constexpr_algorithms != 202306L
385+
# error "__cpp_lib_constexpr_algorithms should have the value 202306L in c++26"
385386
# endif
386387

387388
# if !defined(_LIBCPP_VERSION)

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/* Constant Value
1919
__cpp_lib_as_const 201510L [C++17]
2020
__cpp_lib_constexpr_algorithms 201806L [C++20]
21+
202306L [C++26]
2122
__cpp_lib_constexpr_utility 201811L [C++20]
2223
__cpp_lib_constrained_equality 202403L [C++26]
2324
__cpp_lib_exchange_function 201304L [C++14]
@@ -407,8 +408,8 @@
407408
# ifndef __cpp_lib_constexpr_algorithms
408409
# error "__cpp_lib_constexpr_algorithms should be defined in c++26"
409410
# endif
410-
# if __cpp_lib_constexpr_algorithms != 201806L
411-
# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++26"
411+
# if __cpp_lib_constexpr_algorithms != 202306L
412+
# error "__cpp_lib_constexpr_algorithms should have the value 202306L in c++26"
412413
# endif
413414

414415
# ifndef __cpp_lib_constexpr_utility

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
__cpp_lib_complex_udls 201309L [C++14]
5757
__cpp_lib_concepts 202002L [C++20]
5858
__cpp_lib_constexpr_algorithms 201806L [C++20]
59+
202306L [C++26]
5960
__cpp_lib_constexpr_bitset 202207L [C++23]
6061
__cpp_lib_constexpr_charconv 202207L [C++23]
6162
__cpp_lib_constexpr_cmath 202202L [C++23]
@@ -6565,8 +6566,8 @@
65656566
# ifndef __cpp_lib_constexpr_algorithms
65666567
# error "__cpp_lib_constexpr_algorithms should be defined in c++26"
65676568
# endif
6568-
# if __cpp_lib_constexpr_algorithms != 201806L
6569-
# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++26"
6569+
# if __cpp_lib_constexpr_algorithms != 202306L
6570+
# error "__cpp_lib_constexpr_algorithms should have the value 202306L in c++26"
65706571
# endif
65716572

65726573
# ifndef __cpp_lib_constexpr_bitset

libcxx/utils/generate_feature_test_macro_components.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def add_version_header(tc):
320320
"name": "__cpp_lib_constexpr_algorithms",
321321
"values": {
322322
"c++20": 201806,
323-
# "c++26": 202306, # P2562R1 constexpr Stable Sorting
323+
"c++26": 202306,
324324
},
325325
"headers": ["algorithm", "utility"],
326326
},

0 commit comments

Comments
 (0)