tmp/tmpukl808e6/{from.md → to.md}
RENAMED
|
@@ -54,28 +54,28 @@ namespace std {
|
|
| 54 |
template<class T1, class T2>
|
| 55 |
pair(T1, T2) -> pair<T1, T2>;
|
| 56 |
}
|
| 57 |
```
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
|
| 63 |
The defaulted move and copy constructor, respectively, of `pair` is a
|
| 64 |
constexpr function if and only if all required element-wise
|
| 65 |
initializations for move and copy, respectively, would be
|
| 66 |
constexpr-suitable [[dcl.constexpr]].
|
| 67 |
|
| 68 |
If
|
| 69 |
`(is_trivially_destructible_v<T1> && is_trivially_destructible_v<T2>)`
|
| 70 |
is `true`, then the destructor of `pair` is trivial.
|
| 71 |
|
| 72 |
-
`pair<T, U>` is a structural type [[
|
| 73 |
-
structural types. Two values `p1` and `p2` of type
|
| 74 |
-
template-argument-equivalent [[temp.type]] if and only
|
| 75 |
-
`p2.first` are template-argument-equivalent and
|
| 76 |
-
`p2.second` are template-argument-equivalent.
|
| 77 |
|
| 78 |
``` cpp
|
| 79 |
constexpr explicit(see below) pair();
|
| 80 |
```
|
| 81 |
|
|
@@ -251,12 +251,12 @@ constexpr pair& operator=(pair&& p) noexcept(see below);
|
|
| 251 |
*Constraints:*
|
| 252 |
|
| 253 |
- `is_move_assignable_v<T1>` is `true` and
|
| 254 |
- `is_move_assignable_v<T2>` is `true`.
|
| 255 |
|
| 256 |
-
*Effects:* Assigns
|
| 257 |
-
`
|
| 258 |
|
| 259 |
*Returns:* `*this`.
|
| 260 |
|
| 261 |
*Remarks:* The exception specification is equivalent to:
|
| 262 |
|
|
@@ -285,13 +285,12 @@ template<class U1, class U2> constexpr pair& operator=(pair<U1, U2>&& p);
|
|
| 285 |
*Constraints:*
|
| 286 |
|
| 287 |
- `is_assignable_v<T1&, U1>` is `true` and
|
| 288 |
- `is_assignable_v<T2&, U2>` is `true`.
|
| 289 |
|
| 290 |
-
*Effects:* Assigns
|
| 291 |
-
`second`
|
| 292 |
-
`std::forward<U2>(p.second)`.
|
| 293 |
|
| 294 |
*Returns:* `*this`.
|
| 295 |
|
| 296 |
``` cpp
|
| 297 |
template<pair-like P> constexpr pair& operator=(P&& p);
|
|
|
|
| 54 |
template<class T1, class T2>
|
| 55 |
pair(T1, T2) -> pair<T1, T2>;
|
| 56 |
}
|
| 57 |
```
|
| 58 |
|
| 59 |
+
Member functions of `pair` do not throw exceptions unless one of the
|
| 60 |
+
element-wise operations specified to be called for that operation throws
|
| 61 |
+
an exception.
|
| 62 |
|
| 63 |
The defaulted move and copy constructor, respectively, of `pair` is a
|
| 64 |
constexpr function if and only if all required element-wise
|
| 65 |
initializations for move and copy, respectively, would be
|
| 66 |
constexpr-suitable [[dcl.constexpr]].
|
| 67 |
|
| 68 |
If
|
| 69 |
`(is_trivially_destructible_v<T1> && is_trivially_destructible_v<T2>)`
|
| 70 |
is `true`, then the destructor of `pair` is trivial.
|
| 71 |
|
| 72 |
+
`pair<T, U>` is a structural type [[term.structural.type]] if `T` and
|
| 73 |
+
`U` are both structural types. Two values `p1` and `p2` of type
|
| 74 |
+
`pair<T, U>` are template-argument-equivalent [[temp.type]] if and only
|
| 75 |
+
if `p1.first` and `p2.first` are template-argument-equivalent and
|
| 76 |
+
`p1.second` and `p2.second` are template-argument-equivalent.
|
| 77 |
|
| 78 |
``` cpp
|
| 79 |
constexpr explicit(see below) pair();
|
| 80 |
```
|
| 81 |
|
|
|
|
| 251 |
*Constraints:*
|
| 252 |
|
| 253 |
- `is_move_assignable_v<T1>` is `true` and
|
| 254 |
- `is_move_assignable_v<T2>` is `true`.
|
| 255 |
|
| 256 |
+
*Effects:* Assigns `std::forward<T1>(p.first)` to `first` and
|
| 257 |
+
`std::forward<T2>(p.second)` to `second`.
|
| 258 |
|
| 259 |
*Returns:* `*this`.
|
| 260 |
|
| 261 |
*Remarks:* The exception specification is equivalent to:
|
| 262 |
|
|
|
|
| 285 |
*Constraints:*
|
| 286 |
|
| 287 |
- `is_assignable_v<T1&, U1>` is `true` and
|
| 288 |
- `is_assignable_v<T2&, U2>` is `true`.
|
| 289 |
|
| 290 |
+
*Effects:* Assigns `std::forward<U1>(p.first)` `first` and
|
| 291 |
+
`std::forward<U2>(p.second)` to `second`.
|
|
|
|
| 292 |
|
| 293 |
*Returns:* `*this`.
|
| 294 |
|
| 295 |
``` cpp
|
| 296 |
template<pair-like P> constexpr pair& operator=(P&& p);
|