OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / static3.C
1 template <class data> class foo
2 {
3     public:
4         static const int a;
5         static const int b;
6         static const int c;
7         static const int d;
8 };
9
10 template <class data> const int foo<data>::a = 1;
11 template <class data> const int foo<data>::b = a;
12 template <class data> const int foo<data>::c = b;
13 template <class data> const int foo<data>::d = c;
14
15 typedef foo<int> fooInt;
16
17 int main( void )
18 {
19     fooInt *f;
20
21     f = new fooInt();
22
23     if (f->c != 1 || f->d != 1)
24       return 1;
25 }