// _S_has_simple_call_op to true if the behavior of this adaptor is
// independent of the constness/value category of the adaptor object.
template<typename _Derived>
- struct _RangeAdaptorClosure
- { };
+ struct _RangeAdaptorClosure;
template<typename _Tp, typename _Up>
requires (!same_as<_Tp, _RangeAdaptorClosure<_Up>>)
}
#pragma GCC diagnostic pop
+ template<typename _Derived>
+ struct _RangeAdaptorClosure
+ {
+ // In non-modules compilation ADL finds these operators either way and
+ // the friend declarations are redundant. But with the std module these
+ // friend declarations enable ADL to find these operators without having
+ // to export them.
+ template<typename _Self, typename _Range>
+ requires __is_range_adaptor_closure<_Self>
+ && __adaptor_invocable<_Self, _Range>
+ friend constexpr auto
+ operator|(_Range&& __r, _Self&& __self);
+
+ template<typename _Lhs, typename _Rhs>
+ requires __is_range_adaptor_closure<_Lhs>
+ && __is_range_adaptor_closure<_Rhs>
+ friend constexpr auto
+ operator|(_Lhs&& __lhs, _Rhs&& __rhs);
+ };
+
// The base class of every range adaptor non-closure.
//
// The static data member _Derived::_S_arity must contain the total number of