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