diff --git a/libcxx/docs/Status/Cxx2bIssues.csv b/libcxx/docs/Status/Cxx2bIssues.csv --- a/libcxx/docs/Status/Cxx2bIssues.csv +++ b/libcxx/docs/Status/Cxx2bIssues.csv @@ -231,7 +231,7 @@ "`3784 `__","std.compat should not provide ``::byte`` and its friends", "November 2022","","","" "`3785 `__","``ranges::to`` is over-constrained on the destination type being a range", "November 2022","","","|ranges|" "`3788 `__","``jthread::operator=(jthread&&)`` postconditions are unimplementable under self-assignment", "November 2022","","","" -"`3792 `__","``__cpp_lib_constexpr_algorithms`` should also be defined in ````", "November 2022","","","" +"`3792 `__","``__cpp_lib_constexpr_algorithms`` should also be defined in ````", "November 2022","|Complete|","16.0","" "`3795 `__","Self-move-assignment of ``std::future`` and ``std::shared_future`` have unimplementable postconditions", "November 2022","","","" "`3796 `__","``movable-box`` as member should use ``default-initialization`` instead of ``copy-initialization``", "November 2022","","","|ranges|" "`3798 `__","Rvalue reference and ``iterator_category``", "November 2022","","","" diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -55,7 +55,7 @@ __cpp_lib_clamp 201603L __cpp_lib_complex_udls 201309L __cpp_lib_concepts 202002L -__cpp_lib_constexpr_algorithms 201806L +__cpp_lib_constexpr_algorithms 201806L __cpp_lib_constexpr_bitset 202207L __cpp_lib_constexpr_charconv 202207L __cpp_lib_constexpr_cmath 202202L 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 --- 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 @@ -17,6 +17,7 @@ /* Constant Value __cpp_lib_as_const 201510L [C++17] + __cpp_lib_constexpr_algorithms 201806L [C++20] __cpp_lib_constexpr_utility 201811L [C++20] __cpp_lib_exchange_function 201304L [C++14] __cpp_lib_forward_like 202207L [C++2b] @@ -37,6 +38,10 @@ # error "__cpp_lib_as_const should not be defined before c++17" # endif +# ifdef __cpp_lib_constexpr_algorithms +# error "__cpp_lib_constexpr_algorithms should not be defined before c++20" +# endif + # ifdef __cpp_lib_constexpr_utility # error "__cpp_lib_constexpr_utility should not be defined before c++20" # endif @@ -79,6 +84,10 @@ # error "__cpp_lib_as_const should not be defined before c++17" # endif +# ifdef __cpp_lib_constexpr_algorithms +# error "__cpp_lib_constexpr_algorithms should not be defined before c++20" +# endif + # ifdef __cpp_lib_constexpr_utility # error "__cpp_lib_constexpr_utility should not be defined before c++20" # endif @@ -133,6 +142,10 @@ # error "__cpp_lib_as_const should have the value 201510L in c++17" # endif +# ifdef __cpp_lib_constexpr_algorithms +# error "__cpp_lib_constexpr_algorithms should not be defined before c++20" +# endif + # ifdef __cpp_lib_constexpr_utility # error "__cpp_lib_constexpr_utility should not be defined before c++20" # endif @@ -187,6 +200,13 @@ # error "__cpp_lib_as_const should have the value 201510L in c++20" # endif +# ifndef __cpp_lib_constexpr_algorithms +# error "__cpp_lib_constexpr_algorithms should be defined in c++20" +# endif +# if __cpp_lib_constexpr_algorithms != 201806L +# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++20" +# endif + # ifndef __cpp_lib_constexpr_utility # error "__cpp_lib_constexpr_utility should be defined in c++20" # endif @@ -247,6 +267,13 @@ # error "__cpp_lib_as_const should have the value 201510L in c++2b" # endif +# ifndef __cpp_lib_constexpr_algorithms +# error "__cpp_lib_constexpr_algorithms should be defined in c++2b" +# endif +# if __cpp_lib_constexpr_algorithms != 201806L +# error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++2b" +# endif + # ifndef __cpp_lib_constexpr_utility # error "__cpp_lib_constexpr_utility should be defined in c++2b" # endif diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -213,7 +213,7 @@ }, { "name": "__cpp_lib_constexpr_algorithms", "values": { "c++20": 201806 }, - "headers": ["algorithm"], + "headers": ["algorithm", "utility"], }, { "name": "__cpp_lib_constexpr_bitset", "values": { "c++2b": 202207 },