prog.cpp:31:57: error: decltype cannot resolve address of overloaded function
using print_type = std::result_of_t<decltype(&Foo::print)(Foo, Args ...)> (Foo::*)(Args ...); //version2 (std::result_of) = not work
^
prog.cpp:31:73: error: template argument 1 is invalid
using print_type = std::result_of_t<decltype(&Foo::print)(Foo, Args ...)> (Foo::*)(Args ...); //version2 (std::result_of) = not work
^
prog.cpp: In function ‘int main()’:
prog.cpp:34:10: error: ‘print_type’ was not declared in this scope
func<print_type<int,double> >();
^~~~~~~~~~
prog.cpp:34:5: error: parse error in template argument list
func<print_type<int,double> >();
^~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cpp:34:35: error: expected primary-expression before ‘)’ token
func<print_type<int,double> >();
^