I am trying to write a template function that accepts a std::function which depends on the template arguments. Unfortunately the compiler is not capable of corr
std::function
You can do the conversion inline or use bind. Neither is particularly pretty, but they get the job done:
bind
CallFunc(id, param, std::function(DoSomething));
CallFunc(id, param, std::bind(DoSomething, std::placeholders::_1, std::placeholders::_2));