What is the fastest and shortest way to pass a function as parameter of another function without using other libraries other than the std one in just one line?
I mea
You are looking at several options.
std::function
which is part of C++ TR1 and C++11std::ptr_fun
to adapt your functionThe syntax you are showing is only going to work with C++11. Earlier C++ versions don't offer the possibility to define an anonymous function.