Skip to content

Commit 812e64a

Browse files
jensmaurertkoeppe
authored andcommitted
[expr.prim.lambda.general] Add example for parsing ambiguity
Fixes NB JP 021 (C++23 DIS).
1 parent 4005215 commit 812e64a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/expressions.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,6 +1798,11 @@
17981798
\begin{note}
17991799
Such ambiguous cases cannot have valid semantics
18001800
because the constraint expression would not have type \keyword{bool}.
1801+
\begin{example}
1802+
\begin{codeblock}
1803+
auto x = []<class T> requires T::operator int [[some_attribute]] (int) { }
1804+
\end{codeblock}
1805+
\end{example}
18011806
\end{note}
18021807

18031808
\pnum

0 commit comments

Comments
 (0)