Brief introduction:
[Capture] (parameter) mutable->return_type {statement}
[Capture]: A capture list, which is a caret of a lambda function that captures a variable from the context for use by a function.
[var]: Value passing capture variable var;
[=]: Value passing captures all parent-scoped variables;
[&var]: Reference passing capture variable var;
[&]: Reference passing captures all parent-scoped variables;
[This]: value is passed to capture the current this pointer.
(parameter): Parameter list. If you do not need it, you can omit it together with parentheses.
The mutable:mutable modifier. By default, a lambda function is always a const function, and mutable can cancel its constant nature. When you use this modifier, the argument list cannot be omitted.
->return_type: return type. Displays the claim return type. Do not need to return when you can omit it together with. When there is a return value, the type can be inferred by the compiler itself, implicitly declared.
{statement}: function body. You can use the capture list to capture a variable or use a parameter in a parameter list.
Instance:
[C++11] lambda function