Hi, The following code seems to be OK to me: template<class X> class Base { protected: X *elems; }; template<class A> class Derived: public Base<typename A::value_type> { void Test() { if (elems) { } } }; Attempting to compile it gives the following error: templates.cpp:18: error: 'elems' was not declared in this scope True, elems was not declared in this scope.. it was declared in THAT scope. Why is it an error and what is going through GCC's mind when it compiles this? Thanks, Alexei