[cfe-commits] [cfe-dev] anchoring explicit template instantiations
Rafael Espíndola
rafael.espindola at gmail.com
Sun Jan 29 11:13:44 PST 2012
>> Ah, right - so using a explicit template declaration + definition in
>> C++11 means that any TU seeing the declaration can avoid emitting the
>> template instantiation (& rely on some other TU to provide it) but it
>> doesn't guarantee that some 3rd TU might never see the declaration and
>> go ahead and instantiate it anyway - thus the symbols must remain
>> weak.
>
> Exactly.
Why? Since it is invalid to have two explicit template instantiation
definitions, there would be at most one strong symbol and the static
linker would always select it, no?
Is it a problem with some dynamic linkers?
>
> - Doug
Cheers,
Rafael
More information about the cfe-commits
mailing list