aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_email.py
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-09-06 14:13:18 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-09-07 08:09:58 +0100
commitf12e26f3496275a432c6f6a326598db3441a9725 (patch)
tree1256418fdf96c1f76147e709c98a2050792751e5 /contrib/gcc-changelog/git_email.py
parent6854e3ac71209ac786b878ef4abe6856a50c221d (diff)
downloadgcc-f12e26f3496275a432c6f6a326598db3441a9725.zip
gcc-f12e26f3496275a432c6f6a326598db3441a9725.tar.gz
gcc-f12e26f3496275a432c6f6a326598db3441a9725.tar.bz2
libstdc++: Fix <ranges> tests that fail in C++23
The tests for the std::ranges access CPOs (ranges::begin etc) use pathological types with ridiculous overload sets for begin/end/data members, to exercise all the corner cases in the specification. Since P2278R4 "cbegin should always return a constant iterator" was implemented for C++23 mode, some of the range access CPOs now require the argument to satisfy the range concept, which was not previously required. The behaviour of the CPO also changes for corner cases where the type is a range R for which constant_range<R> is satisfied in addition to constant_range<const R> (meaning there's no need to wrap its iterators in const_iterator). Adjust the expected results for those pathological types that changed meaning in C++23, and add some new types to verify other corner cases. Some other range adaptor tests fail for C++20 because they assert that ranges::end and ranges::cend return different types, which is not true when the type satisfies constant_range. This fixes the tests to PASS for both C++20 and C++23 (and later). libstdc++-v3/ChangeLog: * testsuite/std/ranges/access/cbegin.cc: Adjust for C++23 compatibility. * testsuite/std/ranges/access/cdata.cc: Likewise. * 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/take.cc: Likewise. * testsuite/std/ranges/adaptors/take_while.cc: Likewise. * testsuite/std/ranges/adaptors/transform.cc: Likewise.
Diffstat (limited to 'contrib/gcc-changelog/git_email.py')
0 files changed, 0 insertions, 0 deletions