tmp/tmpz7jbn9k4/{from.md → to.md}
RENAMED
|
@@ -7,65 +7,44 @@ template <class T1, class T2>
|
|
| 7 |
|
| 8 |
*Returns:* `x.first == y.first && x.second == y.second`.
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
template<class T1, class T2>
|
| 12 |
-
constexpr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
```
|
| 14 |
|
| 15 |
*Returns:*
|
| 16 |
-
`x.first < y.first || (!(y.first < x.first) && x.second < y.second)`.
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
-
|
| 20 |
-
|
| 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
|
|
|
|
| 7 |
|
| 8 |
*Returns:* `x.first == y.first && x.second == y.second`.
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
template<class T1, class T2>
|
| 12 |
+
constexpr common_comparison_category_t<synth-three-way-result<T1>,
|
| 13 |
+
synth-three-way-result<T2>>
|
| 14 |
+
operator<=>(const pair<T1, T2>& x, const pair<T1, T2>& y);
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
*Effects:* Equivalent to:
|
| 18 |
+
|
| 19 |
+
``` cpp
|
| 20 |
+
if (auto c = synth-three-way(x.first, y.first); c != 0) return c;
|
| 21 |
+
return synth-three-way(x.second, y.second);
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
``` cpp
|
| 25 |
+
template<class T1, class T2>
|
| 26 |
+
constexpr void swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
*Constraints:* `is_swappable_v<T1>` is `true` and `is_swappable_v<T2>`
|
| 30 |
+
is `true`.
|
| 31 |
+
|
| 32 |
+
*Effects:* Equivalent to `x.swap(y)`.
|
| 33 |
+
|
| 34 |
+
``` cpp
|
| 35 |
+
template<class T1, class T2>
|
| 36 |
+
constexpr pair<unwrap_ref_decay_t<T1>, unwrap_ref_decay_t<T2>> make_pair(T1&& x, T2&& y);
|
| 37 |
```
|
| 38 |
|
| 39 |
*Returns:*
|
|
|
|
| 40 |
|
| 41 |
``` cpp
|
| 42 |
+
pair<unwrap_ref_decay_t<T1>,
|
| 43 |
+
unwrap_ref_decay_t<T2>>(std::forward<T1>(x), std::forward<T2>(y))
|
| 44 |
```
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
[*Example 1*:
|
| 47 |
|
| 48 |
In place of:
|
| 49 |
|
| 50 |
``` cpp
|