diff --git a/libcxx/docs/Status/Cxx2b.rst b/libcxx/docs/Status/Cxx2b.rst --- a/libcxx/docs/Status/Cxx2b.rst +++ b/libcxx/docs/Status/Cxx2b.rst @@ -52,3 +52,7 @@ :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 --- 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 --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -190,7 +190,7 @@ 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 --- a/libcxx/include/__ranges/transform_view.h +++ b/libcxx/include/__ranges/transform_view.h @@ -166,7 +166,7 @@ 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 --- 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 --- 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 --- 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 --- 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 @@ 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;