[Bug libstdc++/100824] ranges::size should treat the subexpression as an lvalue

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 11 22:25:43 GMT 2021


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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:950535915868cd0b7f3dbad4321de913f01bddfc

commit r11-8556-g950535915868cd0b7f3dbad4321de913f01bddfc
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jun 4 20:25:39 2021 +0100

    libstdc++: Fix helper concept for ranges::data [PR 100824]

    We need to decay the result of t.data() before checking if it's a
    pointer.

    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

    libstdc++-v3/ChangeLog:

            PR libstdc++/100824
            * include/bits/ranges_base.h (__member_data): Use __decay_copy.
            * testsuite/std/ranges/access/data.cc: Add testcase from PR.

    (cherry picked from commit 3e5f2425f80aedd00f28235022a2755eb46f310d)


More information about the Gcc-bugs mailing list