His entire reason for not using C++ lambda, and wanting local functions instead, is faulty His reason: I heard they can perform heap allocation. Reality: No they do not perform heap allocation, that would only happen if you stuffed it into an std::function