编译器错误 C2823

typedef 模板是非法的

typedef 定义中不允许使用模板。

示例

下面的示例生成了 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;