#include <iostream>
using namespace std;
template <class T>
class Test
{
union obj
{
union obj* next;
int num;
};
static const int SZ=3;
static obj* volatile list[SZ];
};
template <class T>
Test<T>::obj* volatile
Test<T>::list[SZ]=
{
0, 0, 0
};
int main()
{
return 0;
}
g ++では、次のエラーが発生します。
18 |エラー:'*'トークンの前にコンストラクタ、デストラクタ、または型変換が必要です