]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++/ranges: make _RangeAdaptorClosure befriend operator|
authorPatrick Palka <ppalka@redhat.com>
Wed, 27 Nov 2024 16:59:38 +0000 (11:59 -0500)
committerPatrick Palka <ppalka@redhat.com>
Wed, 27 Nov 2024 16:59:38 +0000 (11:59 -0500)
commit56029c91dcadcfd1800614b7484d3dc82ca16dde
tree6e226f60e767a4a90e01da85360f5b6e11f333bd
parent958f0025f41d8bd9812e4da91a72b1ad79496e5b
libstdc++/ranges: make _RangeAdaptorClosure befriend operator|

This declares the range adaptor pipe operators a friend of the
_RangeAdaptorClosure base class so that the std module doesn't need to
export them for ADL to find them.

Note that we deliberately don't define these pipe operators as hidden
friends, see r14-3293-g4a6f3676e7dd9e.

libstdc++-v3/ChangeLog:

* include/std/ranges (views::__adaptor::_RangeAdaptorClosure):
Befriend both operator| overloads.
* src/c++23/std.cc.in: Don't export views::__adaptor::operator|.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/include/std/ranges
libstdc++-v3/src/c++23/std.cc.in