E
Eric
I have a template class that instantiates a variable of the template
parameter type as follows:
template <class T>
struct TemplateClass
{
T t;
};
struct TestClass
{
int x;
static TemplateClass<TestClass> v2;
};
Under Visual C++ 7 I get the following compiler error:
error C2079: 'TemplateClass<T>::t' uses undefined struct 'TestClass' with
[ T=TestClass ]
However, it compiles fine under the Borland compiler.
Is this a bug in the Visual C++ compiler?
I would appreciate any comments.
parameter type as follows:
template <class T>
struct TemplateClass
{
T t;
};
struct TestClass
{
int x;
static TemplateClass<TestClass> v2;
};
Under Visual C++ 7 I get the following compiler error:
error C2079: 'TemplateClass<T>::t' uses undefined struct 'TestClass' with
[ T=TestClass ]
However, it compiles fine under the Borland compiler.
Is this a bug in the Visual C++ compiler?
I would appreciate any comments.