template class foo { public: static const int a; static const int b; static const int c; static const int d; }; template const int foo::a = 1; template const int foo::b = a; template const int foo::c = b; template const int foo::d = c; typedef foo fooInt; int main( void ) { fooInt *f; f = new fooInt(); if (f->c != 1 || f->d != 1) return 1; }