This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Obscure problem with template virtual tables not made weak (?)


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]