Skip to content

Commit 66eee9f

Browse files
burblebeetkoeppe
authored andcommitted
LWG4071 reference_wrapper comparisons are not SFINAE-friendly
1 parent 544d2e5 commit 66eee9f

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

source/utilities.tex

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11003,10 +11003,9 @@
1100311003
friend constexpr bool operator==(reference_wrapper, const T&);
1100411004
friend constexpr bool operator==(reference_wrapper, reference_wrapper<const T>);
1100511005

11006-
friend constexpr @\exposidnc{synth-three-way-result}@<T> operator<=>(reference_wrapper, reference_wrapper);
11007-
friend constexpr @\exposidnc{synth-three-way-result}@<T> operator<=>(reference_wrapper, const T&);
11008-
friend constexpr @\exposidnc{synth-three-way-result}@<T> operator<=>(reference_wrapper,
11009-
reference_wrapper<const T>);
11006+
friend constexpr auto operator<=>(reference_wrapper, reference_wrapper);
11007+
friend constexpr auto operator<=>(reference_wrapper, const T&);
11008+
friend constexpr auto operator<=>(reference_wrapper, reference_wrapper<const T>);
1101011009
};
1101111010

1101211011
template<class T>
@@ -11183,34 +11182,45 @@
1118311182
\end{itemdescr}
1118411183

1118511184
\begin{itemdecl}
11186-
friend constexpr @\exposidnc{synth-three-way-result}@<T> operator<=>(reference_wrapper x, reference_wrapper y);
11185+
friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper y);
1118711186
\end{itemdecl}
1118811187

1118911188
\begin{itemdescr}
11189+
\pnum
11190+
\constraints
11191+
The expression \tcode{\exposid{synth-three-way}(x.get(), y.get())}
11192+
is well-formed.
11193+
1119011194
\pnum
1119111195
\returns
1119211196
\tcode{\exposid{synth-three-way}(x.get(), y.get())}.
1119311197
\end{itemdescr}
1119411198

1119511199
\begin{itemdecl}
11196-
friend constexpr @\exposidnc{synth-three-way-result}@<T> operator<=>(reference_wrapper x, const T& y);
11200+
friend constexpr auto operator<=>(reference_wrapper x, const T& y);
1119711201
\end{itemdecl}
1119811202

1119911203
\begin{itemdescr}
11204+
\pnum
11205+
\constraints
11206+
The expression \tcode{\exposid{synth-three-way}(x.get(), y)}
11207+
is well-formed.
11208+
1120011209
\pnum
1120111210
\returns
1120211211
\tcode{\exposid{synth-three-way}(x.get(), y)}.
1120311212
\end{itemdescr}
1120411213

1120511214
\begin{itemdecl}
11206-
friend constexpr @\exposidnc{synth-three-way-result}@<T> operator<=>(reference_wrapper x,
11207-
reference_wrapper<const T> y);
11215+
friend constexpr auto operator<=>(reference_wrapper x, reference_wrapper<const T> y);
1120811216
\end{itemdecl}
1120911217

1121011218
\begin{itemdescr}
1121111219
\pnum
1121211220
\constraints
1121311221
\tcode{is_const_v<T>} is \tcode{false}.
11222+
The expression \tcode{\exposid{synth-three-way}(x.get(), y.get())}
11223+
is well-formed.
1121411224

1121511225
\pnum
1121611226
\returns

0 commit comments

Comments
 (0)