[cfe-commits] [Patch] Forbid C++11 attributes on explicit template instantiation.

John McCall rjmccall at apple.com
Tue Dec 11 20:01:34 PST 2012


On Dec 7, 2012, at 3:08 PM, Michael Han <fragmentshaders at gmail.com> wrote:
> This small patch forbids C++11 attributes on explicit template instantiations, as required by C++11 [dcl.attr.grammar] p4.

Hmm.  It's easy to imagine attributes that are useful on explicit template instantiations.  We already support visibility attributes here (to override the visibility of the instantiated symbols), and we've discussed having an attribute which would guarantee a unique explicit instantiation (allowing the symbols to be emitted with strong linkage).  So this is a rather unfortunate language rule, and it undermines any argument that people ought to prefer the new syntax for existing attributes.

John.



More information about the cfe-commits mailing list