diff --git a/source/expressions.tex b/source/expressions.tex index 296109998f..d3c1040b85 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1636,8 +1636,8 @@ \begin{bnf} \nontermdef{lambda-expression}\br - lambda-introducer \opt{lambda-declarator} compound-statement\br - lambda-introducer \terminal{<} template-parameter-list \terminal{>} \opt{requires-clause} \opt{lambda-declarator} compound-statement + lambda-introducer lambda-declarator compound-statement\br + lambda-introducer \terminal{<} template-parameter-list \terminal{>} \opt{requires-clause} lambda-declarator compound-statement \end{bnf} \begin{bnf} @@ -1647,8 +1647,13 @@ \begin{bnf} \nontermdef{lambda-declarator}\br - \terminal{(} parameter-declaration-clause \terminal{)} \opt{decl-specifier-seq}\br - \bnfindent\opt{noexcept-specifier} \opt{attribute-specifier-seq} \opt{trailing-return-type} \opt{requires-clause} + lambda-specifiers\br + \terminal{(} parameter-declaration-clause \terminal{)} lambda-specifiers \opt{requires-clause} +\end{bnf} + +\begin{bnf} +\nontermdef{lambda-specifiers}\br + \opt{decl-specifier-seq} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \opt{trailing-return-type} \end{bnf} \pnum @@ -1681,7 +1686,7 @@ \end{note} \pnum -If a \grammarterm{lambda-expression} does not include a +If a \grammarterm{lambda-expression} includes an empty \grammarterm{lambda-declarator}, it is as if the \grammarterm{lambda-declarator} were \tcode{()}. The lambda return type is \tcode{auto}, which is replaced by the