How do I get the return type of a function in a class?
for example
class A
{
int foo() {return 1;}
void goo( decltype(((A*)nullptr)->foo()) i) {}
};
decltype(((A*)nullptr)->foo())
doesn't work here because A is an incomplete class. How to do it?
On coliru: http://coliru.stacked-crooked.com/a/830fdd982167a4e8
+2
source to share
No one has answered this question yet
See similar questions:
or similar: