tmp/tmp9hzdbitw/{from.md → to.md}
RENAMED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
|
| 3 |
### General <a id="range.access.general">[[range.access.general]]</a>
|
| 4 |
|
| 5 |
In addition to being available via inclusion of the `<ranges>` header,
|
| 6 |
the customization point objects in [[range.access]] are available when
|
| 7 |
-
`<iterator>` is included.
|
| 8 |
|
| 9 |
Within [[range.access]], the *reified object* of a subexpression `E`
|
| 10 |
denotes
|
| 11 |
|
| 12 |
- the same object as `E` if `E` is a glvalue, or
|
|
@@ -264,10 +264,37 @@ denotes the reified object for `E`. If `ranges::size(t)` is ill-formed,
|
|
| 264 |
`ranges::ssize(E)` is ill-formed. Otherwise let `D` be
|
| 265 |
`make-signed-like-t<decltype(ranges::{}size(t))>`, or `ptrdiff_t` if it
|
| 266 |
is wider than that type; `ranges::ssize(E)` is expression-equivalent to
|
| 267 |
`static_cast<D>(ranges::size(t))`.
|
| 268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
### `ranges::empty` <a id="range.prim.empty">[[range.prim.empty]]</a>
|
| 270 |
|
| 271 |
The name `ranges::empty` denotes a customization point object
|
| 272 |
[[customization.point.object]].
|
| 273 |
|
|
@@ -324,11 +351,11 @@ pointer to object type. — *end note*]
|
|
| 324 |
|
| 325 |
### `ranges::cdata` <a id="range.prim.cdata">[[range.prim.cdata]]</a>
|
| 326 |
|
| 327 |
``` cpp
|
| 328 |
template<class T>
|
| 329 |
-
constexpr auto as-const-pointer(const T* p) { return p; }
|
| 330 |
```
|
| 331 |
|
| 332 |
The name `ranges::cdata` denotes a customization point object
|
| 333 |
[[customization.point.object]]. Given a subexpression `E` with type `T`,
|
| 334 |
let `t` be an lvalue that denotes the reified object for `E`. Then:
|
|
|
|
| 2 |
|
| 3 |
### General <a id="range.access.general">[[range.access.general]]</a>
|
| 4 |
|
| 5 |
In addition to being available via inclusion of the `<ranges>` header,
|
| 6 |
the customization point objects in [[range.access]] are available when
|
| 7 |
+
the header `<iterator>` is included.
|
| 8 |
|
| 9 |
Within [[range.access]], the *reified object* of a subexpression `E`
|
| 10 |
denotes
|
| 11 |
|
| 12 |
- the same object as `E` if `E` is a glvalue, or
|
|
|
|
| 264 |
`ranges::ssize(E)` is ill-formed. Otherwise let `D` be
|
| 265 |
`make-signed-like-t<decltype(ranges::{}size(t))>`, or `ptrdiff_t` if it
|
| 266 |
is wider than that type; `ranges::ssize(E)` is expression-equivalent to
|
| 267 |
`static_cast<D>(ranges::size(t))`.
|
| 268 |
|
| 269 |
+
### `ranges::reserve_hint` <a id="range.prim.size.hint">[[range.prim.size.hint]]</a>
|
| 270 |
+
|
| 271 |
+
The name `ranges::reserve_hint` denotes a customization point object
|
| 272 |
+
[[customization.point.object]].
|
| 273 |
+
|
| 274 |
+
Given a subexpression `E` with type `T`, let `t` be an lvalue that
|
| 275 |
+
denotes the reified object for `E`. Then:
|
| 276 |
+
|
| 277 |
+
- If `ranges::size(E)` is a valid expression, `ranges::reserve_hint(E)`
|
| 278 |
+
is expression-equivalent to `ranges::size(E)`.
|
| 279 |
+
- Otherwise, if `auto(t.reserve_hint())` is a valid expression of
|
| 280 |
+
integer-like type [[iterator.concept.winc]], `ranges::reserve_hint(E)`
|
| 281 |
+
is expression-equivalent to `auto(t.reserve_hint())`.
|
| 282 |
+
- Otherwise, if `T` is a class or enumeration type and
|
| 283 |
+
`auto(reserve_hint(t))` is a valid expression of integer-like type
|
| 284 |
+
where the meaning of `reserve_hint` is established as-if by performing
|
| 285 |
+
argument-dependent lookup only [[basic.lookup.argdep]], then
|
| 286 |
+
`ranges::reserve_hint(E)` is expression-equivalent to that expression.
|
| 287 |
+
- Otherwise, `ranges::reserve_hint(E)` is ill-formed.
|
| 288 |
+
|
| 289 |
+
[*Note 1*: Diagnosable ill-formed cases above result in substitution
|
| 290 |
+
failure when `ranges::reserve_hint(E)` appears in the immediate context
|
| 291 |
+
of a template instantiation. — *end note*]
|
| 292 |
+
|
| 293 |
+
[*Note 2*: Whenever `ranges::reserve_hint(E)` is a valid expression,
|
| 294 |
+
its type is integer-like. — *end note*]
|
| 295 |
+
|
| 296 |
### `ranges::empty` <a id="range.prim.empty">[[range.prim.empty]]</a>
|
| 297 |
|
| 298 |
The name `ranges::empty` denotes a customization point object
|
| 299 |
[[customization.point.object]].
|
| 300 |
|
|
|
|
| 351 |
|
| 352 |
### `ranges::cdata` <a id="range.prim.cdata">[[range.prim.cdata]]</a>
|
| 353 |
|
| 354 |
``` cpp
|
| 355 |
template<class T>
|
| 356 |
+
constexpr auto as-const-pointer(const T* p) noexcept { return p; } // exposition only
|
| 357 |
```
|
| 358 |
|
| 359 |
The name `ranges::cdata` denotes a customization point object
|
| 360 |
[[customization.point.object]]. Given a subexpression `E` with type `T`,
|
| 361 |
let `t` be an lvalue that denotes the reified object for `E`. Then:
|