Lambdas may hold state (like captured references from the surrounding context); if they don't, they can be stored in a function pointer. If they do, they have to be stored as a function object (because there is no where to keep state in a function pointer).
// No state, can be a function pointer:
int (*func_pointer) (int) = [](int a) { return a; };
// One with state:
int b = 3;
std::function<int (int)> func_obj = [&](int a) { return a*b; };
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…