This auto-declaration defines a closure type named factorial that you can
call later instead of typing the entire lambda expression (a closure type is in
fact a compiler-generated function class):
Under the final C++11 spec, if you have a lambda with an empty capture
specification, then it can be treated like a regular function and assigned to a
function pointer. Here’s an example of using a function pointer with a
capture-less lambda:
A delegate. When you call a normal function, all you need is the
function itself. When you call a method on an object, you need
two things: the function and the object itself. It’s the difference
between func() and obj.method(). Starting with some code that
again expects a function as an argument, into which we’ll pass a
delegate. lambda is like a glue to combine for_each and classMessageSizeStor().