From Jason Turner

[range.access.rend]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmprjhrxkb7/{from.md → to.md} +44 -0
tmp/tmprjhrxkb7/{from.md → to.md} RENAMED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### `ranges::rend` <a id="range.access.rend">[[range.access.rend]]</a>
2
+
3
+ The name `ranges::rend` denotes a customization point object
4
+ [[customization.point.object]].
5
+
6
+ Given a subexpression `E` with type `T`, let `t` be an lvalue that
7
+ denotes the reified object for `E`. Then:
8
+
9
+ - If `E` is an rvalue and `enable_borrowed_range<remove_cv_t<T>>` is
10
+ `false`, `ranges::rend(E)` is ill-formed.
11
+ - Otherwise, if `T` is an array type [[basic.compound]] and
12
+ `remove_all_extents_t<T>` is an incomplete type, `ranges::rend(E)` is
13
+ ill-formed with no diagnostic required.
14
+ - Otherwise, if `decay-copy(t.rend())` is a valid expression whose type
15
+ models `sentinel_for<decltype(ranges::rbegin(E))>` then
16
+ `ranges::rend(E)` is expression-equivalent to
17
+ `decay-copy(t.rend({}))`.
18
+ - Otherwise, if `T` is a class or enumeration type and
19
+ `decay-copy(rend(t))` is a valid expression whose type models
20
+ `sentinel_for<decltype(ranges::rbegin(E))>` with overload resolution
21
+ performed in a context in which unqualified lookup for `rend` finds
22
+ only the declarations
23
+ ``` cpp
24
+ void rend(auto&) = delete;
25
+ void rend(const auto&) = delete;
26
+ ```
27
+
28
+ then `ranges::rend(E)` is expression-equivalent to
29
+ `decay-copy(rend(t))` with overload resolution performed in the above
30
+ context.
31
+ - Otherwise, if both `ranges::begin(t)` and `ranges::end(t)` are valid
32
+ expressions of the same type which models `bidirectional_iterator`
33
+ [[iterator.concept.bidir]], then `ranges::rend(E)` is
34
+ expression-equivalent to `make_reverse_iterator(ranges::begin(t))`.
35
+ - Otherwise, `ranges::rend(E)` is ill-formed.
36
+
37
+ [*Note 1*: Diagnosable ill-formed cases above result in substitution
38
+ failure when `ranges::rend(E)` appears in the immediate context of a
39
+ template instantiation. — *end note*]
40
+
41
+ [*Note 2*: Whenever `ranges::rend(E)` is a valid expression, the types
42
+ `S` and `I` of `ranges::rend(E)` and `ranges::rbegin(E)` model
43
+ `sentinel_for<S, I>`. — *end note*]
44
+