Don't accept std::function directly as function parameter.