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

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 and other trailing arguments.

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

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

Like other customization point objects, let

calls to

are all equivalent.

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

[edit] Notes

operator() is unsupported for volatile-qualified or const-volatile-qualified version of range adaptor object types. Arrays and functions are converted to pointers while binding.