编译器错误 C3215
“type1”: 泛型类型参数已由“type2”进行约束
已多次指定约束。
有关泛型的详细信息,请参阅 Generics。
下面的示例生成 C3215:
// C3215.cpp
// compile with: /clr
interface struct A {};
generic <class T>
where T : A,A
ref class C {}; // C3215
可能的解决方法:
// C3215b.cpp
// compile with: /clr /c
interface struct A {};
generic <class T>
where T : A
ref class C {};