|
1903 | 1903 | if the lambda has a \grammarterm{template-parameter-list}.
|
1904 | 1904 | \begin{example}
|
1905 | 1905 | \begin{codeblock}
|
1906 |
| -int i = [](int i, auto a) { return i; }(3, 4); // OK, a generic lambda |
1907 |
| -int j = []<class T>(T t, int i) { return i; }(3, 4); // OK, a generic lambda |
| 1906 | +auto x = [](int i, auto a) { return i; }; // OK, a generic lambda |
| 1907 | +auto y = [](this auto self, int i) { return i; }; // OK, a generic lambda |
| 1908 | +auto z = []<class T>(int i) { return i; }; // OK, a generic lambda |
1908 | 1909 | \end{codeblock}
|
1909 | 1910 | \end{example}
|
1910 | 1911 |
|
|
2116 | 2117 | \pnum
|
2117 | 2118 | The closure type for a non-generic \grammarterm{lambda-expression} with no
|
2118 | 2119 | \grammarterm{lambda-capture}
|
| 2120 | +and no explicit object parameter\iref{dcl.fct} |
2119 | 2121 | whose constraints (if any) are satisfied
|
2120 | 2122 | has a conversion function to pointer to
|
2121 | 2123 | function with \Cpp{} language linkage\iref{dcl.link} having
|
|
2136 | 2138 | if the function call operator is an immediate function.
|
2137 | 2139 |
|
2138 | 2140 | \pnum
|
2139 |
| -For a generic lambda with no \grammarterm{lambda-capture}, the closure type has a |
| 2141 | +For a generic lambda with no \grammarterm{lambda-capture} |
| 2142 | +and no explicit object parameter\iref{dcl.fct}, |
| 2143 | +the closure type has a |
2140 | 2144 | conversion function template to
|
2141 | 2145 | pointer to function. The conversion function template has the same invented
|
2142 | 2146 | template parameter list, and the pointer to function has the same
|
|
0 commit comments