Connecting Tech Pros Worldwide Forums | Help | Site Map

C2955: Where's the difference?

Armin Zingler
Guest
 
Posts: n/a
#1: Oct 11 '08
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


David Wilkinson
Guest
 
Posts: n/a
#2: Oct 11 '08

re: C2955: Where's the difference?


Armin Zingler wrote:
Quote:
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.

--
David Wilkinson
Visual C++ MVP
Closed Thread