>"which actually shows the insane amount of hacking required to make a lambda function call itself"
I doesn't require any hack at all, it doesn't even require to capture the variable. You just need to be sure to make it persist and be accessible in the scope of the lambda.
When you wrap a lambda into a std::function variable, it involves a call to a virtual function which add overheads (often unnoticed unless you repeat the call several times), so a regular recursive functor would be even faster.
The subject was discussed in the following threads:
I doesn't require any hack at all, it doesn't even require to capture the variable. You just need to be sure to make it persist and be accessible in the scope of the lambda.
For example:
http://ideone.com/6hwVGy
That said, please don't do it in production code. std::function is very inefficient when it is being used in a recursive way