编译器错误 C3869
gcnew 约束缺少空参数列表“()”
在没有空参数列表的情况下指定了 gcnew
特殊约束。 有关详细信息,请参阅泛型类型参数的约束 (C++/CLI)。
示例
下面的示例生成 C3869。
// C3869.cpp
// compile with: /c /clr
using namespace System;
generic <typename T>
where T : gcnew // C3869
// try the following line instead
// where T : gcnew()
ref class List {};