tmp/tmp99_klufy/{from.md → to.md}
RENAMED
|
@@ -1,12 +1,19 @@
|
|
| 1 |
### `ranges::cdata` <a id="range.prim.cdata">[[range.prim.cdata]]</a>
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
The name `ranges::cdata` denotes a customization point object
|
| 4 |
-
[[customization.point.object]].
|
| 5 |
-
|
| 6 |
|
| 7 |
-
-
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
|
| 10 |
[*Note 1*: Whenever `ranges::cdata(E)` is a valid expression, it has
|
| 11 |
-
pointer to object type. — *end note*]
|
| 12 |
|
|
|
|
| 1 |
### `ranges::cdata` <a id="range.prim.cdata">[[range.prim.cdata]]</a>
|
| 2 |
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class T>
|
| 5 |
+
constexpr auto as-const-pointer(const T* p) { return p; } // exposition only
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
The name `ranges::cdata` denotes a customization point object
|
| 9 |
+
[[customization.point.object]]. Given a subexpression `E` with type `T`,
|
| 10 |
+
let `t` be an lvalue that denotes the reified object for `E`. Then:
|
| 11 |
|
| 12 |
+
- If `E` is an rvalue and `enable_borrowed_range<remove_cv_t<T>>` is
|
| 13 |
+
`false`, `ranges::cdata(E)` is ill-formed.
|
| 14 |
+
- Otherwise, `ranges::cdata(E)` is expression-equivalent to
|
| 15 |
+
`as-const-pointer(ranges::data(possibly-const-range(t)))`.
|
| 16 |
|
| 17 |
[*Note 1*: Whenever `ranges::cdata(E)` is a valid expression, it has
|
| 18 |
+
pointer to constant object type. — *end note*]
|
| 19 |
|