c++ - How to get the return type of a function in class? -
for example
class { int foo() {return 1;} void goo( decltype(((a*)nullptr)->foo()) i) {} };
the decltype(((a*)nullptr)->foo())
doesn't work here because incomplete class. how it?
on coliru: http://coliru.stacked-crooked.com/a/830fdd982167a4e8
c++ class c++11 decltype
No comments:
Post a Comment