Quote Originally Posted by C_ntua
this makes it more optimal as well. For example, you don't need to copy PO into a temporary object (your functor) you can just access it provided it is within the scope.
You don't need to copy P0 into a temporary object with the function object version either: a reference member can be used instead. Remember, a lambda is syntactic sugar that results in a function object.

Quote Originally Posted by whiteflags
With lambdas I think it has to be global again, which is not so great; with functors, it can just be a data member like everyone said.
No, it does not have to be global: C_ntua's example looks correct in that regard because of the & in the capture list.