编译器错误 C3235

“专用化”: 不允许显式专用化或部分专用化泛型类

泛型类不能用于显式专用化或部分专用化。

示例

以下示例生成 C3235。

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

generic<>
public ref class C<int> {};   // C3235 Remove this specialization to resolve this error.