3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 14 Nov 2000 <nathan@codesourcery.com>
6 // Bug 635. We failed to emit initializer code for out-of-class defined
7 // static const members of template instantiations.
17 template<typename T> struct X
19 static const bool cflag;
21 static const bool iflag = true;
22 static const bool jflag = true;
25 template<typename T> const bool X<T>::cflag (setFlag ());
26 template<typename T> bool X<T>::flag (setFlag ());
27 template<typename T> const bool X<T>::iflag;
53 // On platforms that do not have weak symbols, these static data
54 // members must be explicitly instantiated. The iflag and jflag data
55 // members should not have to be explicitly instantiated because their
56 // const-ness should allow the compiler to elide references to the
58 template const bool X<int>::cflag;
59 template const bool X<int>::flag;
60 template const bool X<float>::cflag;
61 template const bool X<float>::flag;