Partilhar via


Erro do compilador C2933

'class' : type-class-id redefinido como um membro typedef de 'identifier'

Observações

Não é possível usar uma classe genérica ou classe template como membro typedef.

Este erro está obsoleto no Visual Studio 2022 e versões posteriores.

Examples

O exemplo a seguir gera C2933:

// C2933.cpp
// compile with: /c
template<class T> struct TC { };
struct MyStruct {
   typedef int TC<int>;   // C2933
};

struct TC2 { };
struct MyStruct2 {
   typedef int TC2;
};

C2933 também pode ocorrer ao usar genéricos:

// C2933b.cpp
// compile with: /clr /c
generic<class T> ref struct GC { };
struct MyStruct {
   typedef int GC<int>;   // C2933
};

ref struct GC2 { };
struct MyStruct2 {
   typedef int GC2;
};