Compiler Error C2823
TOC
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error C2823

Error Message

a typedef template is illegal

Templates are not allowed in typedef definitions.

The following sample generates C2823:

// C2823.cpp
template<class T>
typedef struct x {
   T i;   // C2823 can't use T, specify data type and delete template
   int i;   // OK
} x1;
Show:
© 2016 Microsoft