|
100 | 100 | struct pair;
|
101 | 101 |
|
102 | 102 | // \ref{pairs.spec}, pair specialized algorithms
|
| 103 | + template<class T1, class T2> |
| 104 | + constexpr bool operator==(const pair<T1, T2>&, const pair<T1, T2>&); |
| 105 | + template<class T1, class T2> |
| 106 | + constexpr common_comparison_category_t<@\placeholder{synth-three-way-result}@<T1>, |
| 107 | + @\placeholder{synth-three-way-result}@<T2>> |
| 108 | + operator<=>(const pair<T1, T2>&, const pair<T1, T2>&); |
| 109 | + |
103 | 110 | template<class T1, class T2>
|
104 | 111 | constexpr void swap(pair<T1, T2>& x, pair<T1, T2>& y) noexcept(noexcept(x.swap(y)));
|
105 | 112 |
|
|
496 | 503 | constexpr pair& operator=(pair<U1, U2>&& p);
|
497 | 504 |
|
498 | 505 | constexpr void swap(pair& p) noexcept(@\seebelow@);
|
499 |
| - |
500 |
| - // \ref{pairs.spec}, pair specialized algorithms |
501 |
| - friend constexpr bool operator==(const pair&, const pair&) = default; |
502 |
| - friend constexpr bool operator==(const pair& x, const pair& y) |
503 |
| - requires (is_reference_v<T1> || is_reference_v<T2>) |
504 |
| - { return x.first == y.first && x.second == y.second; } |
505 |
| - friend constexpr common_comparison_category_t<@\placeholder{synth-three-way-result}@<T1>, |
506 |
| - @\placeholder{synth-three-way-result}@<T2>> |
507 |
| - operator<=>(const pair& x, const pair& y) { @\seebelow@ } |
508 | 506 | };
|
509 | 507 |
|
510 | 508 | template<class T1, class T2>
|
|
790 | 788 |
|
791 | 789 | \rSec2[pairs.spec]{Specialized algorithms}
|
792 | 790 |
|
| 791 | +\indexlibrarymember{operator==}{pair}% |
| 792 | +\begin{itemdecl} |
| 793 | +template<class T1, class T2> |
| 794 | + constexpr bool operator==(const pair<T1, T2>& x, const pair<T1, T2>& y); |
| 795 | +\end{itemdecl} |
| 796 | + |
| 797 | +\begin{itemdescr} |
| 798 | +\pnum |
| 799 | +\returns |
| 800 | +\tcode{x.first == y.first \&\& x.second == y.second}. |
| 801 | +\end{itemdescr} |
| 802 | + |
793 | 803 | \indexlibrarymember{operator<=>}{pair}%
|
794 | 804 | \begin{itemdecl}
|
795 |
| -friend constexpr |
796 |
| - common_comparison_category_t<@\placeholder{synth-three-way-result}@<T1>, @\placeholder{synth-three-way-result}@<T2>> |
797 |
| - operator<=>(const pair& x, const pair& y); |
| 805 | +template<class T1, class T2> |
| 806 | + constexpr common_comparison_category_t<@\placeholder{synth-three-way-result}@<T1>, |
| 807 | + @\placeholder{synth-three-way-result}@<T2>> |
| 808 | + operator<=>(const pair<T1, T2>& x, const pair<T1, T2>& y); |
798 | 809 | \end{itemdecl}
|
799 | 810 |
|
800 | 811 | \begin{itemdescr}
|
|
0 commit comments