I would like to do a forward declare of a nested class in a template, but can't get the syntax right. For example:
Code:
template <class T>
class Y
{
public:
    class Z;

    Z *z;

    void foo();
};

template <class T>
void Y<T>::foo()
{
}

template <class T>
class Y<T>::Z
{
public:
    int i;
};
The code is all in the same header.
The foo part compiles ok, but I can't get the Z part.
I am using VC7.

Thank you,
John Flegert