Templates are slower to compile and more difficult to read, in this case generalization is not needed and can be replaced by std::function.
Templates are slower to compile and more difficult to read, in this case generalization is not needed and can be replaced by std::function.