コンパイラ エラー C2992
'class' : 型パラメーター リストが無効であるか、または不足しています。
クラスの前に、パラメーターがないか、無効である template または generic キーワードが指定されています。
例
次の例では C2992 が生成されます。
// C2992.cpp
// compile with: /c
template <class T>
struct TC1 {
template <class U>
struct TC2;
};
template <class T> struct TC1<T>::TC2 {}; // C2992
// OK
template <class T>
template <class U>
struct TC1<T>::TC2 {};
// C2992 can also occur when using generics:
// C2992c.cpp
// compile with: /clr /c
generic <class T>
ref struct GC1 {
generic <class U>
ref struct GC2;
};
generic <class T> ref struct GC1<T>::GC2 {}; // C2992
// OK
generic <class T>
generic <class U>
ref struct GC1<T>::GC2 {};