-
- Downloads
libstdc++: Implement LWG 3798 for range adaptors [PR106676]
LWG 3798 modified the iterator_category of the iterator types for
transform_view, join_with_view, zip_transform_view and
adjacent_transform_view, to allow the iterator's reference type to be an
rvalue reference.
libstdc++-v3/ChangeLog:
PR libstdc++/106676
* include/bits/iterator_concepts.h (__cpp17_fwd_iterator): Use
is_reference instead of is_value_reference.
rvalue references.
* include/std/ranges (transform_view:__iter_cat::_S_iter_cat):
Likewise.
(zip_transform_view::__iter_cat::_S_iter_cat): Likewise.
(adjacent_transform_view::__iter_cat::_S_iter_cat): Likewise.
(join_with_view::__iter_cat::_S_iter_cat): Likewise.
* testsuite/std/ranges/adaptors/transform.cc: Check
iterator_category when the transformation function returns an
rvalue reference type.
Reviewed-by:
Patrick Palka <ppalka@redhat.com>
Showing
- libstdc++-v3/include/bits/iterator_concepts.h 3 additions, 1 deletionlibstdc++-v3/include/bits/iterator_concepts.h
- libstdc++-v3/include/std/ranges 13 additions, 5 deletionslibstdc++-v3/include/std/ranges
- libstdc++-v3/testsuite/std/ranges/adaptors/transform.cc 16 additions, 0 deletionslibstdc++-v3/testsuite/std/ranges/adaptors/transform.cc
Loading
Please register or sign in to comment