It is a lambda expression used to create a function as an expression
[]
is the capture list
A list of symbols can be passed as follows:
- [a,&b] where a is captured by value and b is captured by reference.
- [this] captures the this pointer by value
- [&] captures all automatic variables mentioned in the body of the lambda by reference
- [=] captures all automatic variables mentioned in the body of the lambda by value
- [] captures nothing