aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2024-01-11 13:14:46 -0500
committerPatrick Palka <ppalka@redhat.com>2024-01-11 13:14:46 -0500
commitd2cb4693a0b383e971f67feb96d3b48ff997d2d5 (patch)
tree41acf8616d6e673a8fab2871b127167dd1f4d3d2 /gcc
parenta2be4e155992151b60fca6969a97d6efd91e82b5 (diff)
downloadgcc-d2cb4693a0b383e971f67feb96d3b48ff997d2d5.zip
gcc-d2cb4693a0b383e971f67feb96d3b48ff997d2d5.tar.gz
gcc-d2cb4693a0b383e971f67feb96d3b48ff997d2d5.tar.bz2
libstdc++/ranges: Use C++23 deducing this in _Pipe and _Partial
This simplifies the operator() of the _Pipe and _Partial range adaptor closure objects using C++23 deducing this, allowing us to condense multiple operator() overloads into one. The new __like_t alias template is similar to the expositional one from P0847R6 except it's implemented in terms of forward_like instead of vice versa, and thus ours always yields a reference so e.g. __like_t<A, char> is char&& instead of char. For our purposes (forwarding) this shouldn't make a difference, I think.. libstdc++-v3/ChangeLog: * include/bits/move.h (__like_t): Define in C++23 mode. * include/std/ranges (views::__adaptor::Partial::operator()): Implement using C++23 deducing this when available. (views::__adaptor::_Pipe::operator()): Likewise. * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to accept new "no match for call" errors issued in C++23 mode. * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions