tmp/tmpftyzowbb/{from.md → to.md}
RENAMED
|
@@ -1,24 +1,30 @@
|
|
| 1 |
#### `swap` <a id="tuple.swap">[[tuple.swap]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr void swap(tuple& rhs) noexcept(see below);
|
|
|
|
| 5 |
```
|
| 6 |
|
| 7 |
-
|
| 8 |
-
with [[swappable.requirements]] the corresponding element in `rhs`.
|
| 9 |
|
| 10 |
-
*
|
| 11 |
-
corresponding element in `rhs`.
|
| 12 |
|
| 13 |
-
|
| 14 |
-
<
|
|
|
|
| 15 |
|
| 16 |
-
```
|
| 17 |
-
|
| 18 |
-
```
|
| 19 |
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
*Throws:* Nothing unless one of the element-wise `swap` calls throws an
|
| 23 |
exception.
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#### `swap` <a id="tuple.swap">[[tuple.swap]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr void swap(tuple& rhs) noexcept(see below);
|
| 5 |
+
constexpr void swap(const tuple& rhs) const noexcept(see below);
|
| 6 |
```
|
| 7 |
|
| 8 |
+
Let i be in the range \[`0`, `sizeof...(Types)`) in order.
|
|
|
|
| 9 |
|
| 10 |
+
*Mandates:*
|
|
|
|
| 11 |
|
| 12 |
+
- For the first overload, `(is_swappable_v<Types> && ...)` is `true`.
|
| 13 |
+
- For the second overload, `(is_swappable_v<const Types> && ...)` is
|
| 14 |
+
`true`.
|
| 15 |
|
| 16 |
+
*Preconditions:* For all i, `get<`i`>(*this)` is swappable
|
| 17 |
+
with [[swappable.requirements]] `get<`i`>(rhs)`.
|
|
|
|
| 18 |
|
| 19 |
+
*Effects:* For each i, calls `swap` for `get<`i`>(*this)` with
|
| 20 |
+
`get<`i`>(rhs)`.
|
| 21 |
|
| 22 |
*Throws:* Nothing unless one of the element-wise `swap` calls throws an
|
| 23 |
exception.
|
| 24 |
|
| 25 |
+
*Remarks:* The exception specification is equivalent to
|
| 26 |
+
|
| 27 |
+
- `(is_nothrow_swappable_v<Types> && ...)` for the first overload and
|
| 28 |
+
- `(is_nothrow_swappable_v<const Types> && ...)` for the second
|
| 29 |
+
overload.
|
| 30 |
+
|