prog.cpp: In function ‘int main()’:
prog.cpp:36:10: error: no matching function for call to ‘call_f(int (&)())’
call_f(f);
^
prog.cpp:36:10: note: candidate is:
prog.cpp:22:1: note: template<class Function> typename std::result_of<typename std::remove_reference< <template-parameter-1-1> >::type>::type call_f(Function&&)
call_f(Function&& f)
^
prog.cpp:22:1: note: template argument deduction/substitution failed:
prog.cpp: In substitution of ‘template<class Function> typename std::result_of<typename std::remove_reference< <template-parameter-1-1> >::type>::type call_f(Function&&) [with Function = int (&)()]’:
prog.cpp:36:10: required from here
prog.cpp:22:1: error: no type named ‘type’ in ‘class std::result_of<int()>’
prog.cpp:40:26: error: ‘call_fm’ was not declared in this scope
call_fm(&F::f, &instance);
^