From Jason Turner

[range.adaptor.object]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp9f9j4vlc/{from.md → to.md} +40 -0
tmp/tmp9f9j4vlc/{from.md → to.md} RENAMED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Range adaptor objects <a id="range.adaptor.object">[[range.adaptor.object]]</a>
2
+
3
+ A *range adaptor closure object* is a unary function object that accepts
4
+ a `viewable_range` argument and returns a `view`. For a range adaptor
5
+ closure object `C` and an expression `R` such that `decltype((R))`
6
+ models `viewable_range`, the following expressions are equivalent and
7
+ yield a `view`:
8
+
9
+ ``` cpp
10
+ C(R)
11
+ R | C
12
+ ```
13
+
14
+ Given an additional range adaptor closure object `D`, the expression
15
+ `C | D` is well-formed and produces another range adaptor closure object
16
+ such that the following two expressions are equivalent:
17
+
18
+ ``` cpp
19
+ R | C | D
20
+ R | (C | D)
21
+ ```
22
+
23
+ A *range adaptor object* is a customization point object
24
+ [[customization.point.object]] that accepts a `viewable_range` as its
25
+ first argument and returns a `view`.
26
+
27
+ If a range adaptor object accepts only one argument, then it is a range
28
+ adaptor closure object.
29
+
30
+ If a range adaptor object accepts more than one argument, then the
31
+ following expressions are equivalent:
32
+
33
+ ``` cpp
34
+ adaptor(range, args...)
35
+ adaptor(args...)(range)
36
+ range | adaptor(args...)
37
+ ```
38
+
39
+ In this case, `adaptor(args...)` is a range adaptor closure object.
40
+