tmp/tmpggkoll1k/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### `ranges::end` <a id="range.access.end">[[range.access.end]]</a>
|
| 2 |
+
|
| 3 |
+
The name `ranges::end` 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::end(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::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 `decay-copy(t.end())` is a valid expression whose type
|
| 19 |
+
models `sentinel_for<iterator_t<T>>` then `ranges::end(E)` is
|
| 20 |
+
expression-equivalent to `decay-copy(t.end())`.
|
| 21 |
+
- Otherwise, if `T` is a class or enumeration type and
|
| 22 |
+
`decay-copy(end(t))` is a valid expression whose type models
|
| 23 |
+
`sentinel_for<iterator_t<T>>` with overload resolution performed in a
|
| 24 |
+
context in which unqualified lookup for `end` finds only the
|
| 25 |
+
declarations
|
| 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*]
|
| 38 |
+
|
| 39 |
+
[*Note 2*: Whenever `ranges::end(E)` is a valid expression, the types
|
| 40 |
+
`S` and `I` of `ranges::end(E)` and `ranges::begin(E)` model
|
| 41 |
+
`sentinel_for<S, I>`. — *end note*]
|
| 42 |
+
|