Could some one help me how to implement this code?
I need to pass a function to another function:
std::cout << process_time(Model::method1) <<
The key is that method1
is a function template:
template double method1(std::vector& );
As such, it's not a function... it's a family of functions. process_time
expects a single function, so you just have to pass it the one function that you want to use:
std::cout << process_time(method1) << std::endl;