[ capture clause ] (parameters) -> return-type { definition of method }
Click Here to Expand
- [&] : capture all external variable by reference
- [=] : capture all external variable by value
- [a, &b] : capture a by value and b by reference
- A lambda with empty capture clause [ ] can access only those variable which are local to it.