@@ -73,14 +73,12 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp> {
73
73
// [refwrap.comparisons], comparisons
74
74
75
75
friend constexpr bool operator ==(reference_wrapper __x, reference_wrapper __y) {
76
- // Mandates: The expression x.get() == y.get() is well-formed and its result is convertible to bool.
77
76
static_assert (is_convertible_v<decltype (__x.get () == __y.get ()), bool >);
78
77
79
78
return __x.get () == __y.get ();
80
79
}
81
80
82
81
friend constexpr bool operator ==(reference_wrapper __x, const _Tp& __y) {
83
- // Mandates: The expression x.get() == y is well-formed and its result is convertible to bool.
84
82
static_assert (is_convertible_v<decltype (__x.get () == __y), bool >);
85
83
86
84
return __x.get () == __y;
@@ -89,29 +87,22 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp> {
89
87
friend constexpr bool operator ==(reference_wrapper __x, reference_wrapper<const _Tp> __y)
90
88
requires (!is_const_v<_Tp>)
91
89
{
92
- // Constraints: is_const_v<T> is false.
93
- // Mandates: The expression x.get() == y.get() is well-formed and its result is convertible to bool.
94
90
static_assert (is_convertible_v<decltype (__x.get () == __y.get ()), bool >);
95
91
96
92
return __x.get () == __y.get ();
97
93
}
98
94
99
95
friend constexpr __synth_three_way_result<_Tp> operator <=>(reference_wrapper __x, reference_wrapper __y) {
100
- // return __synth_three_way_result(x.get(), y.get());
101
96
return std::__synth_three_way (__x.get (), __y.get ());
102
97
}
103
98
104
99
friend constexpr __synth_three_way_result<_Tp> operator <=>(reference_wrapper __x, const _Tp& __y) {
105
- // return __synth_three_way_result(__x.get(), __y);
106
100
return std::__synth_three_way (__x.get (), __y.get ());
107
101
}
108
102
109
103
friend constexpr __synth_three_way_result<_Tp> operator <=>(reference_wrapper __x, reference_wrapper<const _Tp> __y)
110
104
requires (!is_const_v<_Tp>)
111
105
{
112
- // Constraints: is_const_v<T> is false.
113
-
114
- // return __synth_three_way_result(__x.get(), __y.get());
115
106
return std::__synth_three_way (__x.get (), __y.get ());
116
107
}
117
108
0 commit comments