Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1009 Bytes

compiler-error-c2992.md

File metadata and controls

53 lines (42 loc) · 1009 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2992
Compiler Error C2992
11/04/2016
C2992
C2992
01b16447-43fe-4e91-9a5a-af884a166a31

Compiler Error C2992

'class' : invalid or missing type parameter list

The class is preceded by a template or generic keyword with missing or invalid parameters.

Example

The following sample generates 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 can also occur when using generics:

// 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 {};