This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Obscure problem with template virtual tables not made weak (?)
- To: Wolfgang Bangerth <wolf at gaia dot IWR dot Uni-Heidelberg dot De>
- Subject: Re: Obscure problem with template virtual tables not made weak (?)
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 01 Mar 1999 08:51:15 -0300
- Cc: egcs-bugs at cygnus dot com
- References: <Pine.SOL.4.05.9903011237470.8199-100000@kronos>
On Mar 1, 1999, Wolfgang Bangerth <wolf@gaia.IWR.Uni-Heidelberg.De> wrote:
> some time ago I ran into a rather obscure problem with virtual
> function tables of automatically instantiated templates not being
> tagged as "weak".
They shouldn't be when you explicitly instantiate the template
classes, as you do in your example. You're explicitly instantiating
the template twice, so it's reasonable to get duplicate definition
errors. Maybe you should explicitly instantiate members of the
template class, not the whole template class...
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org,computer.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Instituto de Computação, Universidade Estadual de Campinas, SP, Brasil