tmp/tmp9ak_b4r9/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### `ranges::rbegin` <a id="range.access.rbegin">[[range.access.rbegin]]</a>
|
| 2 |
+
|
| 3 |
+
The name `ranges::rbegin` 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::rbegin(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::rbegin(E)`
|
| 13 |
+
is ill-formed with no diagnostic required.
|
| 14 |
+
- Otherwise, if `decay-copy(t.rbegin())` is a valid expression whose
|
| 15 |
+
type models `input_or_output_iterator`, `ranges::rbegin(E)` is
|
| 16 |
+
expression-equivalent to `decay-copy(t.rbegin())`.
|
| 17 |
+
- Otherwise, if `T` is a class or enumeration type and
|
| 18 |
+
`decay-copy(rbegin(t))` is a valid expression whose type models
|
| 19 |
+
`input_or_output_iterator` with overload resolution performed in a
|
| 20 |
+
context in which unqualified lookup for `rbegin` finds only the
|
| 21 |
+
declarations
|
| 22 |
+
``` cpp
|
| 23 |
+
void rbegin(auto&) = delete;
|
| 24 |
+
void rbegin(const auto&) = delete;
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
then `ranges::rbegin(E)` is expression-equivalent to
|
| 28 |
+
`decay-copy(rbegin(t))` with overload resolution performed in the
|
| 29 |
+
above context.
|
| 30 |
+
- Otherwise, if both `ranges::begin(t)` and `ranges::end(t)` are valid
|
| 31 |
+
expressions of the same type which models `bidirectional_iterator`
|
| 32 |
+
[[iterator.concept.bidir]], `ranges::rbegin(E)` is
|
| 33 |
+
expression-equivalent to `make_reverse_iterator(ranges::end(t))`.
|
| 34 |
+
- Otherwise, `ranges::rbegin(E)` is ill-formed.
|
| 35 |
+
|
| 36 |
+
[*Note 1*: Diagnosable ill-formed cases above result in substitution
|
| 37 |
+
failure when `ranges::rbegin(E)` appears in the immediate context of a
|
| 38 |
+
template instantiation. — *end note*]
|
| 39 |
+
|
| 40 |
+
[*Note 2*: Whenever `ranges::rbegin(E)` is a valid expression, its type
|
| 41 |
+
models `input_or_output_iterator`. — *end note*]
|
| 42 |
+
|