3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 31 Jul 2003 <nathan@codesourcery.com>
6 // PR c++/11525 incorrect error about non-constant initalizer
8 template<typename> class X;
9 template<unsigned> class Y {};
15 static const unsigned I = X<T>::I;
19 static const unsigned J = X<T>::J; // { dg-message "not initialized with a constant expression" }
21 Y<J> j; // { dg-error "constant" "" }
26 operator unsigned () const;
29 template <typename> struct X
37 Foo<int> (); // { dg-message "instantiated" "" }