TITLE: Template parsing requires type substitution [ This example adapted from "C++ Gotchas", tutorial notes by Tom Cargill, p. 67. ] template class C : T { public: void f() { T :: x y (T :: z); // what is the type of y (method or object)? ... } }; class A { public: enum x {}; enum z {}; }; class B { public: class x { public: x (int); }; int z; }; int main () { C a; // y resolves to a METHOD C b; // y resolves to an OBJECT return 0; }