I tried to use std::result_of, but could not manage it.
#include <type_traits>
class Foo
{
public:
int foo();
};
int main()
{
using return_type = std::result_of_t<Foo::foo()>; // error
return 0;
}
So how can I get the return type of Foo::foo?
Foo::foo()is not a type,std::result_ofexpects a function type.