共用方式為


編譯器錯誤 C2959

泛型類別或函式不可為範本的成員

如需詳細資訊,請參閱 Windows 執行階段 和 Managed 範本泛型

範例

下列範例會產生 C2959。

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