template class A { T x; public: class B { public: T y; }; B f(); }; template A::B A::f() { return B(); } int main() { A a; return 0; } ------------------------------------------------------------------------------------------- test.cpp:26: error: expected constructor, destructor, or type conversion before "A"