std::function, which adds an indirection, vs.
make your function a
template<class Func>and accept a
Func, which can bind directly to whatever is passed?
Thanks to C++11 we received the
std::functionfamily of functor wrappers. Unfortunately, I keep hearing [...] that they are horribly slow. [... Is the right recommendation] that
functions can be used as de facto standard of passing functors, and in places where high performance is expected templates should be used?