diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst index dcf9838edd74b..bbcc76b52f0a9 100644 --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -416,6 +416,8 @@ Status ---------------------------------------------------------- ----------------- ``__cpp_lib_bitset`` ``202306L`` ---------------------------------------------------------- ----------------- + ``__cpp_lib_constexpr_algorithms`` ``202306L`` + ---------------------------------------------------------- ----------------- ``__cpp_lib_constexpr_new`` ``202406L`` ---------------------------------------------------------- ----------------- ``__cpp_lib_constrained_equality`` *unimplemented* diff --git a/libcxx/docs/ReleaseNotes/21.rst b/libcxx/docs/ReleaseNotes/21.rst index f41cf9b51c292..5bb25af4a219d 100644 --- a/libcxx/docs/ReleaseNotes/21.rst +++ b/libcxx/docs/ReleaseNotes/21.rst @@ -42,6 +42,7 @@ Implemented Papers - P0767R1: Deprecate POD (`Github `__) - P1361R2: Integration of chrono with text formatting (`Github `__) - P2255R2: A type trait to detect reference binding to temporary (implemented the type traits only) (`Github `__) +- P2562R1: ``constexpr`` Stable Sorting (`Github `__) Improvements and New Features ----------------------------- diff --git a/libcxx/docs/Status/Cxx2cPapers.csv b/libcxx/docs/Status/Cxx2cPapers.csv index 1436db6cf2b45..9a4cd3e57e842 100644 --- a/libcxx/docs/Status/Cxx2cPapers.csv +++ b/libcxx/docs/Status/Cxx2cPapers.csv @@ -2,7 +2,7 @@ "`P2497R0 `__","Testing for success or failure of ```` functions","2023-06 (Varna)","|Complete|","18","" "`P2592R3 `__","Hashing support for ``std::chrono`` value classes","2023-06 (Varna)","","","" "`P2587R3 `__","``to_string`` or not ``to_string``","2023-06 (Varna)","","","" -"`P2562R1 `__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Partial|","20","" +"`P2562R1 `__","``constexpr`` Stable Sorting","2023-06 (Varna)","|Complete|","21","" "`P2545R4 `__","Read-Copy Update (RCU)","2023-06 (Varna)","","","" "`P2530R3 `__","Hazard Pointers for C++26","2023-06 (Varna)","","","" "`P2538R1 `__","ADL-proof ``std::projected``","2023-06 (Varna)","|Complete|","18","" diff --git a/libcxx/include/version b/libcxx/include/version index 63ead9fd5d29d..83ae11dabd2bc 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -60,7 +60,8 @@ __cpp_lib_chrono_udls 201304L __cpp_lib_clamp 201603L __cpp_lib_complex_udls 201309L __cpp_lib_concepts 202002L -__cpp_lib_constexpr_algorithms 201806L +__cpp_lib_constexpr_algorithms 202306L + 201806L // C++20 __cpp_lib_constexpr_bitset 202207L __cpp_lib_constexpr_charconv 202207L __cpp_lib_constexpr_cmath 202202L @@ -536,6 +537,8 @@ __cpp_lib_void_t 201411L # 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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp index 42ccbfceb8d77..acc13e5405867 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp @@ -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] @@ -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) diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp index ab0988f1d4a54..2a750addbb95f 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp @@ -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] @@ -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 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp index 1e4465d515e6b..59e32caba2b2d 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp @@ -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] @@ -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 diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 8bf7633e985d5..9f1bfe15afe9b 100755 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -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"], },