编译器错误 C2959

泛型类或函数不能是模板的成员

有关详细信息,请参阅 Windows 运行时和托管模板以及泛型

示例

下面的示例生成 C2959。

// C2959.cpp
// compile with: /clr /c
template <class T> ref struct S {
   generic <class U> ref struct GR1;   // C2959
};