编译器错误 C3384

“type_parameter”: 值约束与 ref 约束互相排斥

无法将泛型类型约束为 value classref class

有关详细信息,请参阅泛型类型参数的约束 (C++/CLI)

示例

下面的示例生成 C3384。

// C3384.cpp
// compile with: /c /clr
generic <typename T>
where T : ref class
where T : value class   // C3384
ref class List {};