Muistiinpano
Tälle sivulle pääsy edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoja.
Tälle sivulle pääsy edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoja.
redefinition : 'class' : class template or generic has already been declared as 'type'
Remarks
A generic or template class has multiple declarations, which are not equivalent. To fix this error, use different names for different types, or remove the redefinition of the type name.
Examples
The following example generates C2920 and shows how to fix it:
// C2920.cpp
// compile with: /c
typedef int TC1;
template <class T>
struct TC1 {}; // C2920
struct TC2 {}; // OK - fix by using a different name
C2920 can also occur when using generics:
// C2920b.cpp
// compile with: /clr /c
typedef int GC1;
generic <class T>
ref struct GC1 {}; // C2920
ref struct GC2 {}; // OK - fix by using a different name