aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2025-02-25 13:35:04 -0500
committerPatrick Palka <ppalka@redhat.com>2025-02-25 13:35:04 -0500
commit1b9e4fe2ff5f4711406cdcf0e6e183b247d9f42b (patch)
tree02d4c6620ea3d0d279fd0fc55d53694d095729bf /gcc
parentfffe14f045df597bf5ab50730eebe0977eea7090 (diff)
downloadgcc-1b9e4fe2ff5f4711406cdcf0e6e183b247d9f42b.zip
gcc-1b9e4fe2ff5f4711406cdcf0e6e183b247d9f42b.tar.gz
gcc-1b9e4fe2ff5f4711406cdcf0e6e183b247d9f42b.tar.bz2
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 <jwakely@redhat.com>
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions