Kompilatorfel C3226

En malldeklaration tillåts inte i en allmän deklaration

Anmärkningar

Använd en allmän deklaration i en generisk klass.

Example

I följande exempel genereras C3226:

// C3226.cpp
// compile with: /clr
generic <class T>
ref class C {
   template <class T1>   // C3226
   ref struct S1 {};
};

I följande exempel visas en möjlig lösning:

// C3226b.cpp
// compile with: /clr /c
generic <class T>
ref class C {
   generic <class T1>
   ref struct S1 {};
};