Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error C2923

Error Message

'type' : 'identifier' is not a valid template type argument for parameter 'param'

The argument list is missing a type needed to instantiate the template or generic. Check the template or generic declaration.

The following sample generates C2923:

// C2923.cpp
template <class T> struct TC {};
int x;
int main() {
   TC<x>* tc2;   // C2923
   TC<int>* tc2;   // OK
}

C2923 can also occur when using generics:

// C2923b.cpp
// compile with: /clr /c
generic <class T> ref struct GC {};

int x;

int main() {
   GC<x>^ gc2;   // C2923
   GC<int>^ gc2;   // OK
}

Community Additions

ADD
Show:
© 2015 Microsoft