C2955: Where's the difference?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Armin Zingler

    #1

    C2955: Where's the difference?

    Hi,

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

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

    ref class C2
    {
    private:
    List<TestNamesp ace::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

    #2
    Re: C2955: Where's the difference?

    Armin Zingler wrote:
    Hi,
    >
    I'm using VC++ 2008. This is the code:
    >
    namespace TestNamespace
    {
    generic <class T>
    ref class C1
    {
    };
    >
    ref class C2
    {
    private:
    List<TestNamesp ace::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

    Comment

    Working...