https://github.com/c-rhodes updated https://github.com/llvm/llvm-project/pull/176813
>From 14df24b2931d47da8ec98be1e076f36ca78beff5 Mon Sep 17 00:00:00 2001 From: Hui <[email protected]> Date: Mon, 19 Jan 2026 20:18:57 +0000 Subject: [PATCH] [libc++] define FTM __cpp_lib_ranges_zip (#176569) P2321R2 has been implemented in various PRs. Based on the discussion in #105169, the last bit in iterator.concept.winc doesn't require any changes, so we can actually mark this as done. Fixes #105169 (cherry picked from commit 985d75a57abaabbd4de3aafd42145068d6bedd13) --- libcxx/docs/FeatureTestMacroTable.rst | 2 +- libcxx/docs/ReleaseNotes/22.rst | 3 +- libcxx/docs/Status/Cxx23Papers.csv | 2 +- libcxx/include/version | 2 +- .../ranges.version.compile.pass.cpp | 32 ++++++------------- .../tuple.version.compile.pass.cpp | 32 ++++++------------- .../utility.version.compile.pass.cpp | 32 ++++++------------- .../version.version.compile.pass.cpp | 32 ++++++------------- .../generate_feature_test_macro_components.py | 1 - 9 files changed, 44 insertions(+), 94 deletions(-) diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst index 32911d0f64449..572e0cef6282f 100644 --- a/libcxx/docs/FeatureTestMacroTable.rst +++ b/libcxx/docs/FeatureTestMacroTable.rst @@ -390,7 +390,7 @@ Status ---------------------------------------------------------- ----------------- ``__cpp_lib_ranges_to_container`` ``202202L`` ---------------------------------------------------------- ----------------- - ``__cpp_lib_ranges_zip`` *unimplemented* + ``__cpp_lib_ranges_zip`` ``202110L`` ---------------------------------------------------------- ----------------- ``__cpp_lib_reference_from_temporary`` *unimplemented* ---------------------------------------------------------- ----------------- diff --git a/libcxx/docs/ReleaseNotes/22.rst b/libcxx/docs/ReleaseNotes/22.rst index 4d56c82a53170..623bf409d7ebb 100644 --- a/libcxx/docs/ReleaseNotes/22.rst +++ b/libcxx/docs/ReleaseNotes/22.rst @@ -39,8 +39,7 @@ Implemented Papers ------------------ - P2592R3: Hashing support for ``std::chrono`` value classes (`Github <https://llvm.org/PR105358>`__) -- P2321R2: ``zip`` (`Github <https://llvm.org/PR105169>`__) (The paper is partially implemented. ``zip_transform_view``, - ``adjacent_view``, and ``adjacent_transform_view`` are implemented in this release) +- P2321R2: ``zip`` (`Github <https://llvm.org/PR105169>`__) - P2988R12: ``std::optional<T&>`` (`Github <https://llvm.org/PR148131>`__) - P3044R2: sub-``string_view`` from ``string`` (`Github <https://llvm.org/PR148140>`__) - P3223R2: Making ``std::istream::ignore`` less surprising (`Github <https://llvm.org/PR148178>`__) diff --git a/libcxx/docs/Status/Cxx23Papers.csv b/libcxx/docs/Status/Cxx23Papers.csv index e4c6cb0f51065..2a5c64a53d79e 100644 --- a/libcxx/docs/Status/Cxx23Papers.csv +++ b/libcxx/docs/Status/Cxx23Papers.csv @@ -33,7 +33,7 @@ "`P2077R3 <https://wg21.link/P2077R3>`__","Heterogeneous erasure overloads for associative containers","2021-10 (Virtual)","","","`#105165 <https://github.com/llvm/llvm-project/issues/105165>`__","" "`P2251R1 <https://wg21.link/P2251R1>`__","Require ``span`` & ``basic_string_view`` to be Trivially Copyable","2021-10 (Virtual)","|Complete|","14","`#105166 <https://github.com/llvm/llvm-project/issues/105166>`__","" "`P2301R1 <https://wg21.link/P2301R1>`__","Add a ``pmr`` alias for ``std::stacktrace``","2021-10 (Virtual)","","","`#105167 <https://github.com/llvm/llvm-project/issues/105167>`__","" -"`P2321R2 <https://wg21.link/P2321R2>`__","``zip``","2021-10 (Virtual)","|In Progress|","","`#105169 <https://github.com/llvm/llvm-project/issues/105169>`__","" +"`P2321R2 <https://wg21.link/P2321R2>`__","``zip``","2021-10 (Virtual)","|Complete|","22","`#105169 <https://github.com/llvm/llvm-project/issues/105169>`__","" "`P2340R1 <https://wg21.link/P2340R1>`__","Clarifying the status of the 'C headers'","2021-10 (Virtual)","|Nothing To Do|","","`#105170 <https://github.com/llvm/llvm-project/issues/105170>`__","" "`P2393R1 <https://wg21.link/P2393R1>`__","Cleaning up ``integer``-class types","2021-10 (Virtual)","","","`#105171 <https://github.com/llvm/llvm-project/issues/105171>`__","" "`P2401R0 <https://wg21.link/P2401R0>`__","Add a conditional ``noexcept`` specification to ``std::exchange``","2021-10 (Virtual)","|Complete|","14","`#105172 <https://github.com/llvm/llvm-project/issues/105172>`__","" diff --git a/libcxx/include/version b/libcxx/include/version index d47f0cb6cd41c..bdacfa1737798 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -531,7 +531,7 @@ __cpp_lib_void_t 201411L <type_traits> // # define __cpp_lib_ranges_slide 202202L # define __cpp_lib_ranges_starts_ends_with 202106L # define __cpp_lib_ranges_to_container 202202L -// # define __cpp_lib_ranges_zip 202110L +# define __cpp_lib_ranges_zip 202110L // # define __cpp_lib_reference_from_temporary 202202L // # define __cpp_lib_spanstream 202106L // # define __cpp_lib_stacktrace 202011L diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp index 5116864879485..284b67f7a50ca 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp @@ -332,17 +332,11 @@ # error "__cpp_lib_ranges_to_container should have the value 202202L in c++23" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++23" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++23" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" # endif #elif TEST_STD_VER > 23 @@ -461,17 +455,11 @@ # error "__cpp_lib_ranges_to_container should have the value 202202L in c++26" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++26" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++26" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" # endif #endif // TEST_STD_VER > 23 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp index ceb338d43da78..c0973c03f3273 100644 --- a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp @@ -214,17 +214,11 @@ # error "__cpp_lib_make_from_tuple should have the value 201606L in c++23" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++23" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++23" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" # endif # ifndef __cpp_lib_tuple_element_t @@ -284,17 +278,11 @@ # error "__cpp_lib_make_from_tuple should have the value 201606L in c++26" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++26" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++26" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" # endif # ifndef __cpp_lib_tuple_element_t 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 1d82ef9ec0e86..3f82018a15063 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 @@ -331,17 +331,11 @@ # error "__cpp_lib_integer_sequence should have the value 201304L in c++23" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++23" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++23" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" # endif # ifndef __cpp_lib_to_underlying @@ -436,17 +430,11 @@ # error "__cpp_lib_integer_sequence should have the value 202511L in c++26" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++26" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++26" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" # endif # ifndef __cpp_lib_to_underlying 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 aacccc0451693..bb04b18395903 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 @@ -5772,17 +5772,11 @@ # error "__cpp_lib_ranges_to_container should have the value 202202L in c++23" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++23" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++23" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++23" # endif # ifdef __cpp_lib_ratio @@ -7703,17 +7697,11 @@ # error "__cpp_lib_ranges_to_container should have the value 202202L in c++26" # endif -# if !defined(_LIBCPP_VERSION) -# ifndef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should be defined in c++26" -# endif -# if __cpp_lib_ranges_zip != 202110L -# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" -# endif -# else -# ifdef __cpp_lib_ranges_zip -# error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!" -# endif +# ifndef __cpp_lib_ranges_zip +# error "__cpp_lib_ranges_zip should be defined in c++26" +# endif +# if __cpp_lib_ranges_zip != 202110L +# error "__cpp_lib_ranges_zip should have the value 202110L in c++26" # endif # ifndef __cpp_lib_ratio diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index a847042bf47c0..a13c9e5347eed 100644 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -1169,7 +1169,6 @@ def add_version_header(tc): "name": "__cpp_lib_ranges_zip", "values": {"c++23": 202110}, "headers": ["ranges", "tuple", "utility"], - "unimplemented": True, }, { "name": "__cpp_lib_ratio", _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
