https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106612

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:58a2b7f05587485f846490e21e4de3d51d83afb9

commit r14-11511-g58a2b7f05587485f846490e21e4de3d51d83afb9
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Fri Feb 28 21:44:41 2025 +0000

    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 <ppa...@redhat.com>

    (cherry picked from commit a8ee522c5923ba17851e4b71316a2dff19d6368f)

Reply via email to