template<typename T>struct self{ typedef T type;}; template<class T>class A{ struct Type { int x; };}; template<class T>class B1 : A<T>{ Type insert(); // OK}; template<class T>class B2 : self< A<T> >::type{ Type insert(); // syntax error? Why?};
Standard input is empty
prog.cpp:16:5: error: 'Type' does not name a type prog.cpp:16:5: note: (perhaps 'typename A<T>::Type' was intended) prog.cpp:22:5: error: 'Type' does not name a type
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!