delorie.com/archives/browse.cgi | search |
From: | snowball3 AT bigfoot DOT com (Mark E.) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Can't specify initial value for template static fields |
Date: | Mon, 12 Jul 1999 22:26:25 GMT |
Organization: | Snowball's Web |
Message-ID: | <378a6929.2643866@news3.ibm.net> |
References: | <7mb1u0$4pr21$1 AT titan DOT xtra DOT co DOT nz> |
X-Newsreader: | Forte Agent 1.5/32.452 |
MIME-Version: | 1.0 |
NNTP-Posting-Host: | 129.37.91.170 |
X-Trace: | 12 Jul 1999 22:26:11 GMT, 129.37.91.170 |
Lines: | 23 |
X-Notice: | Items posted that violate the IBM.NET Acceptable Use Policy |
X-Notice: | should be reported to postmaster AT ibm DOT net |
X-Complaints-To: | postmaster AT ibm DOT net |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"Steve Ball" <steve AT effectivejava DOT com> wrote: >Is there any reason why I can't specify an initial value for a static field >of a templated class? >This works fine, but if n is given an initial value: > >template <typename T> >int X<T>::n = 1; > >then the linker complains that X<int>::n is an undefined symbol. > >What am I missing here? > The current version of binutils doesn't support the feature needed to make this work with DJGPP. The next release of binutils will provide this feature. However, it appears the next official release of binutils won't be happening for quite some time. Mark -- Mark E.: snowball3 AT bigfoot DOT com http://snowball.frogspace.net/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |