I would like to use a lambda as a parameter for a C++ function, but I don\'t know which type to specify in the function declaration. What I would like to do is this:
You have 2 ways: make your function template:
template void myFunction(F&& lambda){ //some things }
or erase type with std::function
std::function
void myFunction(const std::function& f){ //some things }