tmp/tmpedpk_hf8/{from.md → to.md}
RENAMED
|
@@ -6,32 +6,25 @@ The name `ranges::end` 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::end(E)` is ill-formed.
|
| 11 |
-
- Otherwise, if `T` is an array type [[
|
| 12 |
`remove_all_extents_t<T>` is an incomplete type, `ranges::end(E)` is
|
| 13 |
ill-formed with no diagnostic required.
|
| 14 |
- Otherwise, if `T` is an array of unknown bound, `ranges::end(E)` is
|
| 15 |
ill-formed.
|
| 16 |
- Otherwise, if `T` is an array, `ranges::end(E)` is
|
| 17 |
expression-equivalent to `t + extent_v<T>`.
|
| 18 |
-
- Otherwise, if `
|
| 19 |
-
|
| 20 |
-
expression-equivalent to `
|
| 21 |
-
- Otherwise, if `T` is a class or enumeration type and
|
| 22 |
-
|
| 23 |
-
`
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
``` cpp
|
| 27 |
-
void end(auto&) = delete;
|
| 28 |
-
void end(const auto&) = delete;
|
| 29 |
-
```
|
| 30 |
-
|
| 31 |
-
then `ranges::end(E)` is expression-equivalent to `decay-copy(end(t))`
|
| 32 |
-
with overload resolution performed in the above context.
|
| 33 |
- Otherwise, `ranges::end(E)` is ill-formed.
|
| 34 |
|
| 35 |
[*Note 1*: Diagnosable ill-formed cases above result in substitution
|
| 36 |
failure when `ranges::end(E)` appears in the immediate context of a
|
| 37 |
template instantiation. — *end note*]
|
|
|
|
| 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::end(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::end(E)` is
|
| 13 |
ill-formed with no diagnostic required.
|
| 14 |
- Otherwise, if `T` is an array of unknown bound, `ranges::end(E)` is
|
| 15 |
ill-formed.
|
| 16 |
- Otherwise, if `T` is an array, `ranges::end(E)` is
|
| 17 |
expression-equivalent to `t + extent_v<T>`.
|
| 18 |
+
- Otherwise, if `auto(t.end())` is a valid expression whose type models
|
| 19 |
+
`sentinel_for<iterator_t<T>>` then `ranges::end(E)` is
|
| 20 |
+
expression-equivalent to `auto(t.end())`.
|
| 21 |
+
- Otherwise, if `T` is a class or enumeration type and `auto(end(t))` is
|
| 22 |
+
a valid expression whose type models `sentinel_for<iterator_t<T>>`
|
| 23 |
+
where the meaning of `end` is established as-if by performing
|
| 24 |
+
argument-dependent lookup only [[basic.lookup.argdep]], then
|
| 25 |
+
`ranges::end(E)` is expression-equivalent to that expression.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
- Otherwise, `ranges::end(E)` is ill-formed.
|
| 27 |
|
| 28 |
[*Note 1*: Diagnosable ill-formed cases above result in substitution
|
| 29 |
failure when `ranges::end(E)` appears in the immediate context of a
|
| 30 |
template instantiation. — *end note*]
|