This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Visibility and C++ Classes/Templates
Mark Mitchell <mark@codesourcery.com> writes:
[...]
| And, "extern template" is a GNU
| extension which says "there's an explicit instantiation elsewhere; you
| needn't bother implicitly instantiating here".
FWIW, "extern template" is now part of C++0x.
| I'm just not comfortable with the idea of #pragmas affecting
| instantiations. (I'm OK with them affecting specializations, though; in
| that case, the original template has basically no impact, so I think
| it's fine to treat the specialization case as if it were any other
| function.)
I'm undecided whether #pragmas should not affect explicit
instantiations. They really are not like implicit instantiations
(which, I agree with you, should not be affected). Explicit
instantiations behave more like real declarations than implicit
instantiations.
-- Gaby