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

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

https://gcc.gnu.org/g:87f87cfb2f75a02bcefbf73f3cf686a7a0d330c3

commit r16-9918-g87f87cfb2f75a02bcefbf73f3cf686a7a0d330c3
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]>
    (cherry picked from commit f7269223c11ba5c33789dd6f99a4fdec9c2b7fd4)

Reply via email to