prog.cpp:11:14: error: ISO C++ forbids declaration of 'TSelf' with no type
prog.cpp:11:25: error: declaration of 'int A<P>::TSelf(P)'
prog.cpp:6:18: error: conflicts with previous declaration 'typedef class A<P> A<P>::TSelf'
prog.cpp: In member function 'int A<P>::TSelf(P)':
prog.cpp:11:18: error: only constructors take base initializers
prog.cpp: At global scope:
prog.cpp: In instantiation of 'A<int>':
prog.cpp:15:1: instantiated from here
prog.cpp:10:5: error: declaration of 'int A<P>::TSelf(P) [with P = int]'
prog.cpp:6:18: error: conflicts with previous declaration 'typedef class A<int> A<int>::TSelf'
prog.cpp: In constructor 'B::B(int)':
prog.cpp:19:25: error: no matching function for call to 'A<int>::A(int&)'
prog.cpp:3:1: note: candidates are: A<int>::A()
prog.cpp:3:1: note: A<int>::A(const A<int>&)