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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:1b9e4fe2ff5f4711406cdcf0e6e183b247d9f42b

commit r15-7698-g1b9e4fe2ff5f4711406cdcf0e6e183b247d9f42b
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Feb 25 13:35:04 2025 -0500

    libstdc++: Implement LWG 4027 change to possibly-const-range [PR118083]

    LWG 4027 effectively makes the const range access CPOs ranges::cfoo behave
    more consistently across C++23 and C++20 (pre-P2278R4) and also more
    consistently with the std::cfoo range accessors, as the below testcase
    adjustments demonstrate (which mostly consist of reverting workarounds
    added by r14-3771-gf12e26f3496275 and r13-7186-g0d94c6df183375).

    In passing fix PR118083 which reports that the input_range constraint on
    possibly-const-range is missing in our implementation.  A consequence of
    this is that the const range access CPOs now consistently reject a
non-range
    argument, and so in some our of tests we need to introduce otherwise
    unused begin/end members.

            PR libstdc++/118083

    libstdc++-v3/ChangeLog:

            * include/bits/ranges_base.h
            (ranges::__access::__possibly_const_range): Adjust logic as per
            LWG 4027.  Add missing input_range constraint.
            * testsuite/std/ranges/access/cbegin.cc (test05): Verify LWG
            4027 testcases.
            * testsuite/std/ranges/access/cdata.cc: Adjust, simplify and
            consolidate some tests after the above.
            * testsuite/std/ranges/access/cend.cc: Likewise.
            * testsuite/std/ranges/access/crbegin.cc: Likewise.
            * testsuite/std/ranges/access/crend.cc: Likewise.
            * testsuite/std/ranges/adaptors/join.cc: Likewise.
            * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
            * testsuite/std/ranges/adaptors/transform.cc: Likewise.

    Reviewed-by: Jonathan Wakely <jwak...@redhat.com>

Reply via email to