[capture](parameters) -> return_type { function_body }
[capture] list supports the definition of closures. Such lambda expressions are defined in the standard as syntactic sugar for an unnamed function object. An example lambda function may be defined as follows:[](int x, int y) -> int { return x + y; }
No comments:
Post a Comment