The below piece of code fails with the following error: f.C: In member function 'virtual int E<T>::f()': f.C:18: error: 'b' was not declared in this scope f.C:18: error: expected `;' before 'i' f.C:18: error: 'i' was not declared in this scope
File f.C: class Base { public: typedef int b; }; template<class T> class D : public Base { public: virtual int f() { return 0; } }; template<class T> class E : public D<T> { public: virtual int f() { b i; i = 1; return i; } }; int main() { } -- Summary: Intermediate template classes makes typdefs in base class go away Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krister_joas at ml dot com GCC target triplet: sparc-sun-solaris2.10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28477