This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11585] static template member definition fails
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2003 00:11:17 -0000
- Subject: [Bug c++/11585] static template member definition fails
- References: <20030719000044.11585.mueller@kde.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11585
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-19 00:11 -------
I found a workaround (if the code given in the bug is not valid, then this is the right thing to do):
template<typename T> class A { static int n; };
template<> int A<int>::n = 0;