We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Timer::run()
1 parent 66078d3 commit 21e0defCopy full SHA for 21e0def
1 file changed
lib/timer.h
@@ -91,7 +91,8 @@ class CPPCHECKLIB Timer {
91
92
void stop();
93
94
- static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const std::function<void()>& f) {
+ template<class TFunc>
95
+ static void run(std::string str, ShowTime showtimeMode, TimerResultsIntf* timerResults, const TFunc& f) {
96
Timer t(std::move(str), showtimeMode, timerResults);
97
f();
98
}
0 commit comments