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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <[email protected]>:

https://gcc.gnu.org/g:f7269223c11ba5c33789dd6f99a4fdec9c2b7fd4

commit r17-5997-gf7269223c11ba5c33789dd6f99a4fdec9c2b7fd4
Author: Jonathan Wakely <[email protected]>
Date:   Wed Nov 4 12:25:46 2026 +0000

    libstdc++: Use decltype(auto) for iter_move (LWG 3953) [PR128413]

    Use decltype(auto) instead of rvalue_reference_t<I> as per LWG 3953, so
    that types which model input_or_output_iterator but not input_iterator
    are not required to have a usable iter_rvalue_reference_t.

    libstdc++-v3/ChangeLog:

            PR libstdc++/128413
            * include/bits/stl_iterator.h (iter_move): Change return type to
            decltype(auto) in overloads for common_iterator and
            counted_iterator, as per LWG 3953.
            * testsuite/24_iterators/common_iterator/lwg3953.cc: New test.
            * testsuite/24_iterators/counted_iterator/lwg3953.cc: New test.

    Reviewed-by: Tomasz KamiÅski <[email protected]>

Reply via email to