Take a look at this answer by Andy Prowl, I think it is partially the answer on your question as well:
In general, if you are facing a design situation that gives you a choice, use templates ...
https://stackoverflow.com/a/14678298/1758762 (std::function vs template)