prog.cpp:25:32: error: 'type' in 'struct return_type<A::X<T> >' does not name a type
typename return_type<A::X<T>>::type A::x()
^
prog.cpp:25:37: error: prototype for 'int A::x()' does not match any in class 'A'
typename return_type<A::X<T>>::type A::x()
^
prog.cpp:21:10: error: candidate is: template<class T> void A::x()
X<T> x;
^