diff --git a/lib/timer.h b/lib/timer.h index ae686b7b3e7..991b334f3aa 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -91,7 +91,8 @@ class CPPCHECKLIB Timer { void stop(); - static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const std::function& f) { + template + static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const TFunc& f) { Timer t(std::move(str), showtimeMode, timerResults); f(); }