// PR c++/24671 // { dg-do compile } template struct A { typedef int X; static const int i = 0; }; template struct B { B(const B&); typedef typename A::i]>::X Y; // { dg-error "forbids zero-size array" } template B(T, Y); }; B b(0,0); // { dg-message "required from here" }