`auto` return type in context of class members
问题 How can automatic type deduction be used for class members? For example, the following code struct A { auto foo(); // foo is defined in another file }; int main() { A a; a.foo(); } where foo has the return type auto results in the following error: error: function 'foo' with deduced return type cannot be used before it is defined a.foo(); ^ The error is comprehensible since the compile cannot know what foo 's return type is without knowing its definition. My question is, if there is any