// PR c++/44587 template struct A { }; template struct B { static const int c; // { dg-message "not initialized with a constant expression" } typedef A::c> C; // { dg-error "constant expression|template argument" } }; template const int B::c = sizeof (T); template struct D { }; template struct E { static const int c = sizeof (T); typedef D::c> F; // OK };