tmp/tmp64ygp92a/{from.md → to.md}
RENAMED
|
@@ -6,31 +6,30 @@ function descriptions that follow, let i be in the range \[`0`,
|
|
| 6 |
`sizeof...(Types)`) in order, `Tᵢ` be the iᵗʰ type in `Types`, and `Uᵢ`
|
| 7 |
be the iᵗʰ type in a template parameter pack named `UTypes`, where
|
| 8 |
indexing is zero-based.
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
-
tuple& operator=(const tuple& u);
|
| 12 |
```
|
| 13 |
|
| 14 |
*Effects:* Assigns each element of `u` to the corresponding element of
|
| 15 |
`*this`.
|
| 16 |
|
| 17 |
-
*Remarks:* This operator
|
| 18 |
`is_copy_assignable_v<``Tᵢ``>` is `true` for all i.
|
| 19 |
|
| 20 |
*Returns:* `*this`.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
-
tuple& operator=(tuple&& u) noexcept(see below);
|
| 24 |
```
|
| 25 |
|
|
|
|
|
|
|
| 26 |
*Effects:* For all i, assigns `std::forward<``Tᵢ``>(get<`i`>(u))` to
|
| 27 |
`get<`i`>(*this)`.
|
| 28 |
|
| 29 |
-
*Remarks:* This operator shall be defined as deleted unless
|
| 30 |
-
`is_move_assignable_v<``Tᵢ``>` is `true` for all i.
|
| 31 |
-
|
| 32 |
*Remarks:* The expression inside `noexcept` is equivalent to the logical
|
| 33 |
<span class="smallcaps">and</span> of the following expressions:
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
is_nothrow_move_assignable_v<Tᵢ>
|
|
@@ -39,61 +38,63 @@ is_nothrow_move_assignable_v<Tᵢ>
|
|
| 39 |
where Tᵢ is the iᵗʰ type in `Types`.
|
| 40 |
|
| 41 |
*Returns:* `*this`.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
-
template
|
| 45 |
```
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
*Effects:* Assigns each element of `u` to the corresponding element of
|
| 48 |
`*this`.
|
| 49 |
|
| 50 |
-
*Remarks:* This operator shall not participate in overload resolution
|
| 51 |
-
unless `sizeof...(Types) == sizeof...(UTypes)` and
|
| 52 |
-
`is_assignable_v<``Tᵢ``&, const ``Uᵢ``&>` is `true` for all i.
|
| 53 |
-
|
| 54 |
*Returns:* `*this`.
|
| 55 |
|
| 56 |
``` cpp
|
| 57 |
-
template
|
| 58 |
```
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
*Effects:* For all i, assigns `std::forward<``Uᵢ``>(get<`i`>(u))` to
|
| 61 |
`get<`i`>(*this)`.
|
| 62 |
|
| 63 |
-
*Remarks:* This operator shall not participate in overload resolution
|
| 64 |
-
unless `is_assignable_v<``Tᵢ``&, ``Uᵢ``&&> == true` for all i and
|
| 65 |
-
`sizeof...(Types) == sizeof...(UTypes)`.
|
| 66 |
-
|
| 67 |
*Returns:* `*this`.
|
| 68 |
|
| 69 |
``` cpp
|
| 70 |
-
template
|
| 71 |
```
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
*Effects:* Assigns `u.first` to the first element of `*this` and
|
| 74 |
`u.second` to the second element of `*this`.
|
| 75 |
|
| 76 |
-
*Remarks:* This operator shall not participate in overload resolution
|
| 77 |
-
unless `sizeof...(Types) == 2` and `is_assignable_v<``T₀``&, const U1&>`
|
| 78 |
-
is `true` for the first type `T₀` in `Types` and
|
| 79 |
-
`is_assignable_v<``T₁``&, const U2&>` is `true` for the second type `T₁`
|
| 80 |
-
in `Types`.
|
| 81 |
-
|
| 82 |
*Returns:* `*this`.
|
| 83 |
|
| 84 |
``` cpp
|
| 85 |
-
template
|
| 86 |
```
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
*Effects:* Assigns `std::forward<U1>(u.first)` to the first element of
|
| 89 |
`*this` and
|
| 90 |
`std::forward<U2>(u.second)` to the second element of `*this`.
|
| 91 |
|
| 92 |
-
*Remarks:* This operator shall not participate in overload resolution
|
| 93 |
-
unless `sizeof...(Types) == 2` and `is_assignable_v<``T₀``&, U1&&>` is
|
| 94 |
-
`true` for the first type `T₀` in `Types` and
|
| 95 |
-
`is_assignable_v<``T₁``&, U2&&>` is `true` for the second type `T₁` in
|
| 96 |
-
`Types`.
|
| 97 |
-
|
| 98 |
*Returns:* `*this`.
|
| 99 |
|
|
|
|
| 6 |
`sizeof...(Types)`) in order, `Tᵢ` be the iᵗʰ type in `Types`, and `Uᵢ`
|
| 7 |
be the iᵗʰ type in a template parameter pack named `UTypes`, where
|
| 8 |
indexing is zero-based.
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
+
constexpr tuple& operator=(const tuple& u);
|
| 12 |
```
|
| 13 |
|
| 14 |
*Effects:* Assigns each element of `u` to the corresponding element of
|
| 15 |
`*this`.
|
| 16 |
|
| 17 |
+
*Remarks:* This operator is defined as deleted unless
|
| 18 |
`is_copy_assignable_v<``Tᵢ``>` is `true` for all i.
|
| 19 |
|
| 20 |
*Returns:* `*this`.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
+
constexpr tuple& operator=(tuple&& u) noexcept(see below);
|
| 24 |
```
|
| 25 |
|
| 26 |
+
*Constraints:* `is_move_assignable_v<``Tᵢ``>` is `true` for all i.
|
| 27 |
+
|
| 28 |
*Effects:* For all i, assigns `std::forward<``Tᵢ``>(get<`i`>(u))` to
|
| 29 |
`get<`i`>(*this)`.
|
| 30 |
|
|
|
|
|
|
|
|
|
|
| 31 |
*Remarks:* The expression inside `noexcept` is equivalent to the logical
|
| 32 |
<span class="smallcaps">and</span> of the following expressions:
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
is_nothrow_move_assignable_v<Tᵢ>
|
|
|
|
| 38 |
where Tᵢ is the iᵗʰ type in `Types`.
|
| 39 |
|
| 40 |
*Returns:* `*this`.
|
| 41 |
|
| 42 |
``` cpp
|
| 43 |
+
template<class... UTypes> constexpr tuple& operator=(const tuple<UTypes...>& u);
|
| 44 |
```
|
| 45 |
|
| 46 |
+
*Constraints:*
|
| 47 |
+
|
| 48 |
+
- `sizeof...(Types)` equals `sizeof...(UTypes)` and
|
| 49 |
+
- `is_assignable_v<``Tᵢ``&, const ``Uᵢ``&>` is `true` for all i.
|
| 50 |
+
|
| 51 |
*Effects:* Assigns each element of `u` to the corresponding element of
|
| 52 |
`*this`.
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
*Returns:* `*this`.
|
| 55 |
|
| 56 |
``` cpp
|
| 57 |
+
template<class... UTypes> constexpr tuple& operator=(tuple<UTypes...>&& u);
|
| 58 |
```
|
| 59 |
|
| 60 |
+
*Constraints:*
|
| 61 |
+
|
| 62 |
+
- `sizeof...(Types)` equals `sizeof...(UTypes)` and
|
| 63 |
+
- `is_assignable_v<``Tᵢ``&, ``Uᵢ``>` is `true` for all i.
|
| 64 |
+
|
| 65 |
*Effects:* For all i, assigns `std::forward<``Uᵢ``>(get<`i`>(u))` to
|
| 66 |
`get<`i`>(*this)`.
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
*Returns:* `*this`.
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
+
template<class U1, class U2> constexpr tuple& operator=(const pair<U1, U2>& u);
|
| 72 |
```
|
| 73 |
|
| 74 |
+
*Constraints:*
|
| 75 |
+
|
| 76 |
+
- `sizeof...(Types)` is 2 and
|
| 77 |
+
- `is_assignable_v<``T₀``&, const U1&>` is `true`, and
|
| 78 |
+
- `is_assignable_v<``T₁``&, const U2&>` is `true`.
|
| 79 |
+
|
| 80 |
*Effects:* Assigns `u.first` to the first element of `*this` and
|
| 81 |
`u.second` to the second element of `*this`.
|
| 82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
*Returns:* `*this`.
|
| 84 |
|
| 85 |
``` cpp
|
| 86 |
+
template<class U1, class U2> constexpr tuple& operator=(pair<U1, U2>&& u);
|
| 87 |
```
|
| 88 |
|
| 89 |
+
*Constraints:*
|
| 90 |
+
|
| 91 |
+
- `sizeof...(Types)` is 2 and
|
| 92 |
+
- `is_assignable_v<``T₀``&, U1>` is `true`, and
|
| 93 |
+
- `is_assignable_v<``T₁``&, U2>` is `true`.
|
| 94 |
+
|
| 95 |
*Effects:* Assigns `std::forward<U1>(u.first)` to the first element of
|
| 96 |
`*this` and
|
| 97 |
`std::forward<U2>(u.second)` to the second element of `*this`.
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
*Returns:* `*this`.
|
| 100 |
|