tmp/tmpqncjivg7/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
#### Swappable requirements <a id="swappable.requirements">[[swappable.requirements]]</a>
|
| 2 |
|
| 3 |
This subclause provides definitions for swappable types and expressions.
|
| 4 |
In these definitions, let `t` denote an expression of type `T`, and let
|
| 5 |
`u` denote an expression of type `U`.
|
| 6 |
|
|
@@ -34,12 +34,13 @@ evaluation context.
|
|
| 34 |
|
| 35 |
An rvalue or lvalue `t` is *swappable* if and only if `t` is swappable
|
| 36 |
with any rvalue or lvalue, respectively, of type `T`.
|
| 37 |
|
| 38 |
A type `X` satisfying any of the iterator requirements (
|
| 39 |
-
[[iterator.requirements]])
|
| 40 |
-
dereferenceable object `x` of type `X`,
|
|
|
|
| 41 |
|
| 42 |
User code can ensure that the evaluation of `swap` calls is performed in
|
| 43 |
an appropriate context under the various conditions as follows:
|
| 44 |
|
| 45 |
``` cpp
|
|
|
|
| 1 |
+
#### `Swappable` requirements <a id="swappable.requirements">[[swappable.requirements]]</a>
|
| 2 |
|
| 3 |
This subclause provides definitions for swappable types and expressions.
|
| 4 |
In these definitions, let `t` denote an expression of type `T`, and let
|
| 5 |
`u` denote an expression of type `U`.
|
| 6 |
|
|
|
|
| 34 |
|
| 35 |
An rvalue or lvalue `t` is *swappable* if and only if `t` is swappable
|
| 36 |
with any rvalue or lvalue, respectively, of type `T`.
|
| 37 |
|
| 38 |
A type `X` satisfying any of the iterator requirements (
|
| 39 |
+
[[iterator.requirements]]) satisfies the requirements of
|
| 40 |
+
`ValueSwappable` if, for any dereferenceable object `x` of type `X`,
|
| 41 |
+
`*x` is swappable.
|
| 42 |
|
| 43 |
User code can ensure that the evaluation of `swap` calls is performed in
|
| 44 |
an appropriate context under the various conditions as follows:
|
| 45 |
|
| 46 |
``` cpp
|