A conversion to function pointer exists for the function object types of lambdas that don't capture any variables. It should be pretty obvious why lambdas that do capture variables don't have that conversion.
However, a normal function pointer worked:
#include <cstdio>
#include <functional>
int main ()
{
volatile int a = 5;
std::function<void ()> func = [a] () { printf("%i\n", a); };
func();
return 0;
}
That code compiles and executes properly on both VC10, 11, and GCC.