次の方法で共有


コンパイラ エラー C3236

generic の明示的なインスタンス生成は使用できません

コンパイラでは、ジェネリック クラスを明示的にインスタンス化できません。

次の例では C3236 が生成されます。

// C3236.cpp
// compile with: /clr
generic<class T>
public ref class X {};

generic ref class X<int>;   // C3236

次の例では、考えられる解決策を示しています。

// C3236b.cpp
// compile with: /clr /c
generic<class T>
public ref class X {};