template<typename> struct B { int x; }; template<typename T> struct X : B<T> { void foo() { this->x = 0; } // this是依赖型名称 };