diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-02-28 21:44:41 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-02-28 21:48:01 +0000 |
commit | a8ee522c5923ba17851e4b71316a2dff19d6368f (patch) | |
tree | a10615e87f9a9bab7a2b4e1f3d4cb3fd543ca5a7 /gcc | |
parent | 3866ca796d5281d33f25b4165badacf8f198c6d1 (diff) | |
download | gcc-a8ee522c5923ba17851e4b71316a2dff19d6368f.zip gcc-a8ee522c5923ba17851e4b71316a2dff19d6368f.tar.gz gcc-a8ee522c5923ba17851e4b71316a2dff19d6368f.tar.bz2 |
libstdc++: Fix ranges::iter_move handling of rvalues [PR106612]
The specification for std::ranges::iter_move apparently requires us to
handle types which do not satisfy std::indirectly_readable, for example
with overloaded operator* which behaves differently for different value
categories.
libstdc++-v3/ChangeLog:
PR libstdc++/106612
* include/bits/iterator_concepts.h (_IterMove::__iter_ref_t):
New alias template.
(_IterMove::__result): Use __iter_ref_t instead of
std::iter_reference_t.
(_IterMove::__type): Remove incorrect __dereferenceable
constraint.
(_IterMove::operator()): Likewise. Add correct constraints. Use
__iter_ref_t instead of std::iter_reference_t. Forward parameter
as correct value category.
(iter_swap): Add comments.
* testsuite/24_iterators/customization_points/iter_move.cc: Test
that iter_move is found by ADL and that rvalue arguments are
handled correctly.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions