C2955: Where's the difference?

A

Armin Zingler

Hi,

I'm using VC++ 2008. This is the code:

namespace TestNamespace
{
generic <class T>
ref class C1
{
};

ref class C2
{
private:
List<TestNamespace::C1^>^ var1;
List<C1^>^ var2; //C2955
};
};

Why does declaration of var1 work whereas var2 produces C2955? I don't see
the difference because "TestNamespace::" is optional in this case. Do I miss
something again?


Armin
 
D

David Wilkinson

Armin said:
Hi,

I'm using VC++ 2008. This is the code:

namespace TestNamespace
{
generic <class T>
ref class C1
{
};

ref class C2
{
private:
List<TestNamespace::C1^>^ var1;
List<C1^>^ var2; //C2955
};
};

Why does declaration of var1 work whereas var2 produces C2955? I don't see
the difference because "TestNamespace::" is optional in this case. Do I
miss
something again?

Armin:

Good question. But they both work if you supply the type for the generic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top