Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zalogować się lub zmienić katalogi.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
"class" : nieprawidłowa lub brakująca lista parametrów typu
Uwagi
Klasa jest poprzedzona template słowem kluczowym lub ogólnym z brakującymi lub nieprawidłowymi parametrami.
Przykłady
Poniższy przykład generuje kod C2992:
// C2992.cpp
// compile with: /c
template <class T>
struct Outer {
template <class U>
struct Inner;
};
template <class T> // C2992
struct Outer<T>::Inner {};
template <class T>
template <class U> // OK
struct Outer<T>::Inner {};
C2992 może również wystąpić w przypadku używania typów ogólnych:
// C2992b.cpp
// compile with: /c /clr
generic <class T>
ref struct Outer {
generic <class U>
ref struct Inner;
};
generic <class T> // C2992
ref struct Outer<T>::Inner {};
generic <class T>
generic <class U> // OK
ref struct Outer<T>::Inner {};