This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with static in templates
- To: Johannus Noordanus <johannes_noordanus at tasking dot nl>
- Subject: Re: Problem with static in templates
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 07 Jan 1999 01:54:42 -0200
- Cc: egcs-bugs at cygnus dot com
- References: <36937CFD.912FBA3A@tasking.nl>
On Jan 6, 1999, Johannus Noordanus <johannes_noordanus@tasking.nl> wrote:
> It seems that the use of static variables within template classes is not
> permitted!
The static variable must be properly defined outside the template
class body, like this:
template <class T> T X<T>::s;
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil