Skip to content

[libc++] Bump __cpp_lib_constexpr_algorithms for P2562R1 in C++26 #132075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libcxx/docs/FeatureTestMacroTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ Status
---------------------------------------------------------- -----------------
``__cpp_lib_bitset`` ``202306L``
---------------------------------------------------------- -----------------
``__cpp_lib_constexpr_algorithms`` ``202306L``
---------------------------------------------------------- -----------------
``__cpp_lib_constexpr_new`` ``202406L``
---------------------------------------------------------- -----------------
``__cpp_lib_constrained_equality`` *unimplemented*
Expand Down
1 change: 1 addition & 0 deletions libcxx/docs/ReleaseNotes/21.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Implemented Papers
- P0767R1: Deprecate POD (`Github <https://github.com/llvm/llvm-project/issues/104013>`__)
- P1361R2: Integration of chrono with text formatting (`Github <https://github.com/llvm/llvm-project/issues/100014>`__)
- P2255R2: A type trait to detect reference binding to temporary (implemented the type traits only) (`Github <https://github.com/llvm/llvm-project/issues/105180>`__)
- P2562R1: ``constexpr`` Stable Sorting (`Github <https://github.com/llvm/llvm-project/issues/105360>`__)

Improvements and New Features
-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion libcxx/docs/Status/Cxx2cPapers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"`P2497R0 <https://wg21.link/P2497R0>`__","Testing for success or failure of ``<charconv>`` functions","2023-06 (Varna)","|Complete|","18",""
"`P2592R3 <https://wg21.link/P2592R3>`__","Hashing support for ``std::chrono`` value classes","2023-06 (Varna)","","",""
"`P2587R3 <https://wg21.link/P2587R3>`__","``to_string`` or not ``to_string``","2023-06 (Varna)","","",""
"`P2562R1 <https://wg21.link/P2562R1>`__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Partial|","20",""
"`P2562R1 <https://wg21.link/P2562R1>`__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Complete|","21",""
"`P2545R4 <https://wg21.link/P2545R4>`__","Read-Copy Update (RCU)","2023-06 (Varna)","","",""
"`P2530R3 <https://wg21.link/P2530R3>`__","Hazard Pointers for C++26","2023-06 (Varna)","","",""
"`P2538R1 <https://wg21.link/P2538R1>`__","ADL-proof ``std::projected``","2023-06 (Varna)","|Complete|","18",""
Expand Down
5 changes: 4 additions & 1 deletion libcxx/include/version
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ __cpp_lib_chrono_udls 201304L <chrono>
__cpp_lib_clamp 201603L <algorithm>
__cpp_lib_complex_udls 201309L <complex>
__cpp_lib_concepts 202002L <concepts>
__cpp_lib_constexpr_algorithms 201806L <algorithm> <utility>
__cpp_lib_constexpr_algorithms 202306L <algorithm> <utility>
201806L // C++20
__cpp_lib_constexpr_bitset 202207L <bitset>
__cpp_lib_constexpr_charconv 202207L <charconv>
__cpp_lib_constexpr_cmath 202202L <cmath> <cstdlib>
Expand Down Expand Up @@ -536,6 +537,8 @@ __cpp_lib_void_t 201411L <type_traits>
# undef __cpp_lib_bind_front
# define __cpp_lib_bind_front 202306L
# define __cpp_lib_bitset 202306L
# undef __cpp_lib_constexpr_algorithms
# define __cpp_lib_constexpr_algorithms 202306L
# if !defined(_LIBCPP_ABI_VCRUNTIME)
# define __cpp_lib_constexpr_new 202406L
# endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Constant Value
__cpp_lib_clamp 201603L [C++17]
__cpp_lib_constexpr_algorithms 201806L [C++20]
202306L [C++26]
__cpp_lib_default_template_type_for_algorithm_values 202403L [C++26]
__cpp_lib_freestanding_algorithm 202311L [C++26]
__cpp_lib_parallel_algorithm 201603L [C++17]
Expand Down Expand Up @@ -380,8 +381,8 @@
# ifndef __cpp_lib_constexpr_algorithms
# error "__cpp_lib_constexpr_algorithms should be defined in c++26"
# endif
# if __cpp_lib_constexpr_algorithms != 201806L
# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++26"
# if __cpp_lib_constexpr_algorithms != 202306L
# error "__cpp_lib_constexpr_algorithms should have the value 202306L in c++26"
# endif

# if !defined(_LIBCPP_VERSION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/* Constant Value
__cpp_lib_as_const 201510L [C++17]
__cpp_lib_constexpr_algorithms 201806L [C++20]
202306L [C++26]
__cpp_lib_constexpr_utility 201811L [C++20]
__cpp_lib_constrained_equality 202403L [C++26]
__cpp_lib_exchange_function 201304L [C++14]
Expand Down Expand Up @@ -407,8 +408,8 @@
# ifndef __cpp_lib_constexpr_algorithms
# error "__cpp_lib_constexpr_algorithms should be defined in c++26"
# endif
# if __cpp_lib_constexpr_algorithms != 201806L
# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++26"
# if __cpp_lib_constexpr_algorithms != 202306L
# error "__cpp_lib_constexpr_algorithms should have the value 202306L in c++26"
# endif

# ifndef __cpp_lib_constexpr_utility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
__cpp_lib_complex_udls 201309L [C++14]
__cpp_lib_concepts 202002L [C++20]
__cpp_lib_constexpr_algorithms 201806L [C++20]
202306L [C++26]
__cpp_lib_constexpr_bitset 202207L [C++23]
__cpp_lib_constexpr_charconv 202207L [C++23]
__cpp_lib_constexpr_cmath 202202L [C++23]
Expand Down Expand Up @@ -6565,8 +6566,8 @@
# ifndef __cpp_lib_constexpr_algorithms
# error "__cpp_lib_constexpr_algorithms should be defined in c++26"
# endif
# if __cpp_lib_constexpr_algorithms != 201806L
# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++26"
# if __cpp_lib_constexpr_algorithms != 202306L
# error "__cpp_lib_constexpr_algorithms should have the value 202306L in c++26"
# endif

# ifndef __cpp_lib_constexpr_bitset
Expand Down
2 changes: 1 addition & 1 deletion libcxx/utils/generate_feature_test_macro_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def add_version_header(tc):
"name": "__cpp_lib_constexpr_algorithms",
"values": {
"c++20": 201806,
# "c++26": 202306, # P2562R1 constexpr Stable Sorting
"c++26": 202306,
},
"headers": ["algorithm", "utility"],
},
Expand Down