tmp/tmpqod96s39/{from.md → to.md}
RENAMED
|
@@ -18,50 +18,55 @@ template <class T1, class T2>
|
|
| 18 |
``` cpp
|
| 19 |
template <class T1, class T2>
|
| 20 |
constexpr bool operator!=(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 21 |
```
|
| 22 |
|
| 23 |
-
*Returns:* `!(x == y)`
|
| 24 |
|
| 25 |
``` cpp
|
| 26 |
template <class T1, class T2>
|
| 27 |
constexpr bool operator>(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 28 |
```
|
| 29 |
|
| 30 |
-
*Returns:* `y < x`
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
template <class T1, class T2>
|
| 34 |
constexpr bool operator>=(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 35 |
```
|
| 36 |
|
| 37 |
-
*Returns:* `!(x < y)`
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template <class T1, class T2>
|
| 41 |
constexpr bool operator<=(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 42 |
```
|
| 43 |
|
| 44 |
-
*Returns:* `!(y < x)`
|
| 45 |
|
| 46 |
``` cpp
|
| 47 |
template<class T1, class T2> void swap(pair<T1, T2>& x, pair<T1, T2>& y)
|
| 48 |
noexcept(noexcept(x.swap(y)));
|
| 49 |
```
|
| 50 |
|
| 51 |
-
*Effects:* `x.swap(y)`
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
``` cpp
|
| 54 |
template <class T1, class T2>
|
| 55 |
constexpr pair<V1, V2> make_pair(T1&& x, T2&& y);
|
| 56 |
```
|
| 57 |
|
| 58 |
-
*Returns:* `pair<V1, V2>(std::forward<T1>(x), std::forward<T2>(y))`
|
| 59 |
-
|
| 60 |
where `V1` and `V2` are determined as follows: Let `Ui` be `decay_t<Ti>`
|
| 61 |
-
for each `Ti`.
|
| 62 |
-
`
|
|
|
|
|
|
|
| 63 |
|
| 64 |
In place of:
|
| 65 |
|
| 66 |
``` cpp
|
| 67 |
return pair<int, double>(5, 3.1415926); // explicit types
|
|
@@ -71,5 +76,7 @@ a C++program may contain:
|
|
| 71 |
|
| 72 |
``` cpp
|
| 73 |
return make_pair(5, 3.1415926); // types are deduced
|
| 74 |
```
|
| 75 |
|
|
|
|
|
|
|
|
|
| 18 |
``` cpp
|
| 19 |
template <class T1, class T2>
|
| 20 |
constexpr bool operator!=(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 21 |
```
|
| 22 |
|
| 23 |
+
*Returns:* `!(x == y)`.
|
| 24 |
|
| 25 |
``` cpp
|
| 26 |
template <class T1, class T2>
|
| 27 |
constexpr bool operator>(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 28 |
```
|
| 29 |
|
| 30 |
+
*Returns:* `y < x`.
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
template <class T1, class T2>
|
| 34 |
constexpr bool operator>=(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 35 |
```
|
| 36 |
|
| 37 |
+
*Returns:* `!(x < y)`.
|
| 38 |
|
| 39 |
``` cpp
|
| 40 |
template <class T1, class T2>
|
| 41 |
constexpr bool operator<=(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 42 |
```
|
| 43 |
|
| 44 |
+
*Returns:* `!(y < x)`.
|
| 45 |
|
| 46 |
``` cpp
|
| 47 |
template<class T1, class T2> void swap(pair<T1, T2>& x, pair<T1, T2>& y)
|
| 48 |
noexcept(noexcept(x.swap(y)));
|
| 49 |
```
|
| 50 |
|
| 51 |
+
*Effects:* As if by `x.swap(y)`.
|
| 52 |
+
|
| 53 |
+
*Remarks:* This function shall not participate in overload resolution
|
| 54 |
+
unless `is_swappable_v<T1>` is `true` and `is_swappable_v<T2>` is
|
| 55 |
+
`true`.
|
| 56 |
|
| 57 |
``` cpp
|
| 58 |
template <class T1, class T2>
|
| 59 |
constexpr pair<V1, V2> make_pair(T1&& x, T2&& y);
|
| 60 |
```
|
| 61 |
|
| 62 |
+
*Returns:* `pair<V1, V2>(std::forward<T1>(x), std::forward<T2>(y))`,
|
|
|
|
| 63 |
where `V1` and `V2` are determined as follows: Let `Ui` be `decay_t<Ti>`
|
| 64 |
+
for each `Ti`. If `Ui` is a specialization of `reference_wrapper`, then
|
| 65 |
+
`Vi` is `Ui::type&`, otherwise `Vi` is `Ui`.
|
| 66 |
+
|
| 67 |
+
[*Example 1*:
|
| 68 |
|
| 69 |
In place of:
|
| 70 |
|
| 71 |
``` cpp
|
| 72 |
return pair<int, double>(5, 3.1415926); // explicit types
|
|
|
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
return make_pair(5, 3.1415926); // types are deduced
|
| 79 |
```
|
| 80 |
|
| 81 |
+
— *end example*]
|
| 82 |
+
|