// DR 408 // { dg-do link } // Test that a size given in the out-of-class definition isn't used until // instantiation time. template struct X { static char s[]; int c; }; template char X::s[sizeof(X)]; #define sassert(EXP) int ar[(EXP)?1:-1] sassert(sizeof (X::s) == sizeof (int)); // Test that a specialization can have a different size. template void g(); template <> void g<2>() { } template struct S { static int i[]; void f(); }; template int S::i[] = { 1 }; template void S::f() { g(); } template <> int S::i[] = { 1, 2 }; int main() { S s; s.f(); }