24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.1 Range adaptor objects [range.adaptor.object]

A range adaptor closure object is a unary function object that accepts a viewable_­range argument and returns a view.
For a range adaptor closure object C and an expression R such that decltype((R)) models viewable_­range, the following expressions are equivalent and yield a view:
C(R)
R | C
Given an additional range adaptor closure object D, the expression C | D is well-formed and produces another range adaptor closure object such that the following two expressions are equivalent:
R | C | D
R | (C | D)
A range adaptor object is a customization point object ([customization.point.object]) that accepts a viewable_­range as its first argument and returns a view.
If a range adaptor object accepts only one argument, then it is a range adaptor closure object.
If a range adaptor object accepts more than one argument, then the following expressions are equivalent:
adaptor(range, args...)
adaptor(args...)(range)
range | adaptor(args...)
In this case, adaptor(args...) is a range adaptor closure object.