I now have a fixed code
template<class _Fn, class... _Args>
void Profiling::GetProfile(_Fn&& _Fx, _Args&&... _Ax)
{
StartTime = clock();
function<void()> f = bind(_Decay_copy(forward<_Fn>(_Fx)), _Decay_copy(forward<_Args>(_Ax))...);
f();
EndTime = clock();
}
But can not call from main using
Profiling VarTest;
VarTest.GetProfile(Test, 1, 5);
where Test is a function that takes two integers
void Test(int a, int b) {
std::cout << a + b;
}
Thanks in advance.