Content deleted Content added
→C++ (since C++11): Complete the syntax of lambdas Tags: Mobile edit Mobile web edit Advanced mobile edit |
|||
Line 603:
[[C++11]] supports anonymous functions (technically [[function object]]s), called ''lambda expressions'',<ref>{{Cite web|title=Lambda expressions (since C++11) - cppreference.com|url=https://en.cppreference.com/w/cpp/language/lambda|access-date=2022-01-14|website=en.cppreference.com}}</ref> which have the form:
<syntaxhighlight lang="cpp">
[ captures ] ( params ) specs requires (optional) { body }
</syntaxhighlight>
where "<code>
This is an example lambda expression:
|