TITLE: Template parsing requires type substitution

[ This example adapted from "C++ Gotchas", tutorial notes
  by Tom Cargill, p. 67. ]


template <class T> 
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> a;         // y resolves to a METHOD
    C<B> b;         // y resolves to an OBJECT

    return 0;
}
