tmp/tmp28g80via/{from.md → to.md}
RENAMED
|
@@ -6,30 +6,22 @@ The name `ranges::rend` denotes a customization point object
|
|
| 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 [[
|
| 12 |
`remove_all_extents_t<T>` is an incomplete type, `ranges::rend(E)` is
|
| 13 |
ill-formed with no diagnostic required.
|
| 14 |
-
- Otherwise, if `
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
`
|
| 20 |
-
`
|
| 21 |
-
|
| 22 |
-
|
| 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.
|
|
@@ -37,8 +29,8 @@ denotes the reified object for `E`. Then:
|
|
| 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)`
|
| 43 |
-
`sentinel_for<S, I>`. — *end note*]
|
| 44 |
|
|
|
|
| 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 [[term.array.type]] 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 `auto(t.rend())` is a valid expression whose type models
|
| 15 |
+
`sentinel_for<decltype({}ranges::rbegin(E))>` then `ranges::rend(E)`
|
| 16 |
+
is expression-equivalent to `auto(t.rend())`.
|
| 17 |
+
- Otherwise, if `T` is a class or enumeration type and `auto(rend(t))`
|
| 18 |
+
is a valid expression whose type models
|
| 19 |
+
`sentinel_for<decltype(ranges::rbegin(E))>` where the meaning of
|
| 20 |
+
`rend` is established as-if by performing argument-dependent lookup
|
| 21 |
+
only [[basic.lookup.argdep]], then `ranges::rend(E)` is
|
| 22 |
+
expression-equivalent to that expression.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
- Otherwise, if both `ranges::begin(t)` and `ranges::end(t)` are valid
|
| 24 |
expressions of the same type which models `bidirectional_iterator`
|
| 25 |
[[iterator.concept.bidir]], then `ranges::rend(E)` is
|
| 26 |
expression-equivalent to `make_reverse_iterator(ranges::begin(t))`.
|
| 27 |
- Otherwise, `ranges::rend(E)` is ill-formed.
|
|
|
|
| 29 |
[*Note 1*: Diagnosable ill-formed cases above result in substitution
|
| 30 |
failure when `ranges::rend(E)` appears in the immediate context of a
|
| 31 |
template instantiation. — *end note*]
|
| 32 |
|
| 33 |
[*Note 2*: Whenever `ranges::rend(E)` is a valid expression, the types
|
| 34 |
+
`S` and `I` of the expressions `ranges::rend(E)` and `ranges::rbegin(E)`
|
| 35 |
+
model `sentinel_for<S, I>`. — *end note*]
|
| 36 |
|