Templates - function as parameter to a template function

option 1) Using std::function, provides more info to the user
template<typename T, typename U> 
void my_func(T t, U u, std::function<void(T, T, U)> f) { f(t,t,u); }

option 2) Using a template functor allows better inlining.
template<typename T, typename U, typename Functor = std::function<void(T, T, U)> > 
void my_func(T t, U u, Functor&& f) { f(t,t,u); }