C++ named requirements: RangeAdaptorObject (since C++20)

From cppreference.com
< cpp‎ | named req
C++ named requirements

Range adaptor objects are customization point objects that accept viewable_range as their first arguments and return a view. Some range adaptor objects are unary, i.e. they take one viewable_range as their only argument. Other range adaptor objects take a viewable_range

If a range adaptor object takes only one argument, it is also a RangeAdaptorClosureObject

If a range adaptor object takes more than one argument, it also supports partial application: let

  • a be such a range adaptor object, and
  • args... be arguments (generally suitable for trailing arguments),

expression a(args...) has following properties:

Like other customization point objects, let

  • a be an object of the cv-unqualified version of the type of any range adaptor objects,
  • args... be any group of arguments that satisfies the constraints of the operator() of the type of a

calls to

are all equivalent.

The result object of each of these expressions is either a view object or a RangeAdaptorClosureObject

Notes

operator()