[cfe-commits] r124089 - in /cfe/trunk: lib/CodeGen/CGRTTI.cpp lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/exceptions-no-rtti.cpp test/CodeGenCXX/key-function-vtable.cpp test/CodeGenCXX/mangle-subst-std.cpp test/CodeGenCXX/rtti-linkage.cpp test/Co...

Renato Golin Renato.Golin at arm.com
Mon Jan 24 09:08:23 PST 2011


On 01/24/11 16:40, Rafael Ávila de Espíndola wrote:
> I remember asking this before, but I cannot remember the answer. Is it
> valid for a program to have multiple explicit template instantiations
> with the same arguments?

Nope: paragraph 14.7.5


> If not, we could use strong definitions for
> those vtables, no?

I think you can't use strong symbol definitions for any template code,
as the linker may find exactly the same symbol in another object, and
two identical non-weak symbols generates an error. So it has to be
either weak or ODR.

But I could be wrong...

cheers,
--renato

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.





More information about the cfe-commits mailing list