tmp/tmp4ektw0gt/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### `ranges::empty` <a id="range.prim.empty">[[range.prim.empty]]</a>
|
| 2 |
+
|
| 3 |
+
The name `ranges::empty` denotes a customization point object
|
| 4 |
+
[[customization.point.object]].
|
| 5 |
+
|
| 6 |
+
Given a subexpression `ranges::empty(E)` with type `T`, let `t` be an
|
| 7 |
+
lvalue that denotes the reified object for `E`. Then:
|
| 8 |
+
|
| 9 |
+
- If `T` is an array of unknown bound [[basic.compound]],
|
| 10 |
+
`ranges::empty(E)` is ill-formed.
|
| 11 |
+
- Otherwise, if `bool(t.empty())` is a valid expression,
|
| 12 |
+
`ranges::empty(E)` is expression-equivalent to `bool(t.empty())`.
|
| 13 |
+
- Otherwise, if `(ranges::size(t) == 0)` is a valid expression,
|
| 14 |
+
`ranges::empty(E)` is expression-equivalent to
|
| 15 |
+
`(ranges::size(t) == 0)`.
|
| 16 |
+
- Otherwise, if `bool(ranges::begin(t) == ranges::end(t))` is a valid
|
| 17 |
+
expression and the type of `ranges::begin(t)` models
|
| 18 |
+
`forward_iterator`, `ranges::empty(E)` is expression-equivalent to
|
| 19 |
+
`bool({}ranges::begin(t) == ranges::end(t))`.
|
| 20 |
+
- Otherwise, `ranges::empty(E)` is ill-formed.
|
| 21 |
+
|
| 22 |
+
[*Note 1*: Diagnosable ill-formed cases above result in substitution
|
| 23 |
+
failure when `ranges::empty(E)` appears in the immediate context of a
|
| 24 |
+
template instantiation. — *end note*]
|
| 25 |
+
|
| 26 |
+
[*Note 2*: Whenever `ranges::empty(E)` is a valid expression, it has
|
| 27 |
+
type `bool`. — *end note*]
|
| 28 |
+
|