tmp/tmplqy_o9m5/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Concept <a id="alg.req.ind.copy">[[alg.req.ind.copy]]</a>
|
| 2 |
+
|
| 3 |
+
The `indirectly_copyable` concept specifies the relationship between a
|
| 4 |
+
`indirectly_readable` type and a `indirectly_writable` type between
|
| 5 |
+
which values may be copied.
|
| 6 |
+
|
| 7 |
+
``` cpp
|
| 8 |
+
template<class In, class Out>
|
| 9 |
+
concept indirectly_copyable =
|
| 10 |
+
indirectly_readable<In> &&
|
| 11 |
+
indirectly_writable<Out, iter_reference_t<In>>;
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
The `indirectly_copyable_storable` concept augments
|
| 15 |
+
`indirectly_copyable` with additional requirements enabling the transfer
|
| 16 |
+
to be performed through an intermediate object of the
|
| 17 |
+
`indirectly_readable` type’s value type. It also requires the capability
|
| 18 |
+
to make copies of values.
|
| 19 |
+
|
| 20 |
+
``` cpp
|
| 21 |
+
template<class In, class Out>
|
| 22 |
+
concept indirectly_copyable_storable =
|
| 23 |
+
indirectly_copyable<In, Out> &&
|
| 24 |
+
indirectly_writable<Out, iter_value_t<In>&> &&
|
| 25 |
+
indirectly_writable<Out, const iter_value_t<In>&> &&
|
| 26 |
+
indirectly_writable<Out, iter_value_t<In>&&> &&
|
| 27 |
+
indirectly_writable<Out, const iter_value_t<In>&&> &&
|
| 28 |
+
copyable<iter_value_t<In>> &&
|
| 29 |
+
constructible_from<iter_value_t<In>, iter_reference_t<In>> &&
|
| 30 |
+
assignable_from<iter_value_t<In>&, iter_reference_t<In>>;
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
Let `i` be a dereferenceable value of type `In`. `In` and `Out` model
|
| 34 |
+
`indirectly_copyable_storable<In, Out>` only if after the initialization
|
| 35 |
+
of the object `obj` in
|
| 36 |
+
|
| 37 |
+
``` cpp
|
| 38 |
+
iter_value_t<In> obj(*i);
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
`obj` is equal to the value previously denoted by `*i`. If
|
| 42 |
+
`iter_reference_t<In>` is an rvalue reference type, the resulting state
|
| 43 |
+
of the value denoted by `*i` is valid but unspecified
|
| 44 |
+
[[lib.types.movedfrom]].
|
| 45 |
+
|