diff --git a/libcxx/docs/Status/Cxx2b.rst b/libcxx/docs/Status/Cxx2b.rst index e79ed285c644da..b50792a2143cc5 100644 --- a/libcxx/docs/Status/Cxx2b.rst +++ b/libcxx/docs/Status/Cxx2b.rst @@ -52,3 +52,7 @@ Library Working Group Issues Status :file: Cxx2bIssues.csv :header-rows: 1 :widths: auto + +.. note:: + + .. [#note-LWG3798] LWG3798: ``join_with_view``, ``zip_transform_view``, and ``adjacent_transform_view`` haven't been done yet since these types aren't implemented yet. diff --git a/libcxx/docs/Status/Cxx2bIssues.csv b/libcxx/docs/Status/Cxx2bIssues.csv index 0dd84d7d8f2732..b286ad3d6b3570 100644 --- a/libcxx/docs/Status/Cxx2bIssues.csv +++ b/libcxx/docs/Status/Cxx2bIssues.csv @@ -234,7 +234,7 @@ "`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","","","" +"`3798 `__","Rvalue reference and ``iterator_category``", "November 2022","|Partial| [#note-LWG3798]_","","|ranges|" "`3801 `__","``cartesian_product_view::iterator::distance-from`` ignores the size of last underlying range", "November 2022","","","|ranges|" "`3814 `__","Add freestanding items requested by NB comments", "November 2022","","","" "`3816 `__","``flat_map`` and ``flat_multimap`` should impose sequence container requirements", "November 2022","","","|flat_containers|" diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h index c9d8944bfee320..c67d4590b46d12 100644 --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -190,7 +190,7 @@ template concept __cpp17_forward_iterator = __cpp17_input_iterator<_Ip> && constructible_from<_Ip> && - is_lvalue_reference_v> && + is_reference_v> && same_as>, typename indirectly_readable_traits<_Ip>::value_type> && requires(_Ip __i) { diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h index 66d9e80e6e61bb..ebdff77a7fec6c 100644 --- a/libcxx/include/__ranges/transform_view.h +++ b/libcxx/include/__ranges/transform_view.h @@ -166,7 +166,7 @@ struct __transform_view_iterator_category_base<_View, _Fn> { using _Cat = typename iterator_traits>::iterator_category; using iterator_category = conditional_t< - is_lvalue_reference_v>>, + is_reference_v>>, conditional_t< derived_from<_Cat, contiguous_iterator_tag>, random_access_iterator_tag, diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp index 7ba8c7587ad1da..0b8dd9f469cd54 100644 --- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp +++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp @@ -72,7 +72,7 @@ static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator>>); static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator>>); static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator>>); -static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator>); +static_assert(std::__iterator_traits_detail::__cpp17_bidirectional_iterator>); // static_assert(std::__iterator_traits_detail::__cpp17_bidirectional_iterator::iterator>); diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp index 7a2000a7634f0b..b92b572fcb12c4 100644 --- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp +++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp @@ -72,7 +72,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator>>); static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator>>); static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator>>); -static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator>); +static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator>); // static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator::iterator>); diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp index ddbf60f9304999..f4adb6afb1e671 100644 --- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp +++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp @@ -72,7 +72,7 @@ static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator>>); static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator>>); static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator>>); -static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator>); +static_assert(std::__iterator_traits_detail::__cpp17_random_access_iterator>); // static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator::iterator>); diff --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp index 2c095d8528f879..25d8936f4e4ebd 100644 --- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp @@ -43,6 +43,15 @@ constexpr bool test() { static_assert(std::same_as); static_assert(std::same_as); } + { + // Member typedefs for random access iterator, LWG3798 rvalue reference. + using TView = std::ranges::transform_view; + using TIter = std::ranges::iterator_t; + static_assert(std::same_as); + static_assert(std::same_as); + static_assert(std::same_as); + static_assert(std::same_as); + } { // Member typedefs for random access iterator/not-lvalue-ref. using TView = std::ranges::transform_view;