共用方式為


編譯器錯誤 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;