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;
このブラウザーはサポートされなくなりました。
Microsoft Edge にアップグレードすると、最新の機能、セキュリティ更新プログラム、およびテクニカル サポートを利用できます。
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;