Anonymous function: Difference between revisions

Content deleted Content added
Add category
Line 605:
[ captures ] ( params ) specs requires (optional) { body }
</syntaxhighlight>
where "<code>specs</code>" is of the form "<code>specifiers exception [[C++11#Attributes|attr]] [[C++11#Alternative function syntax|trailing-return-type]]</code> in that order; each of these components is optional". If it is absent, the return type is deduced from <code>return</code> statements as if for a function with declared return type <code>auto</code>.
 
This is an example lambda expression: