Created on 2010-08-03.00:00:00 last changed 173 months ago
Rationale (August, 2010):
If implementations are allowed to do speculative instantiation for the purpose of inlining, there could be silent changes of meaning depending on whether the instantiation is done or not.
According to 13.9.3 [temp.explicit] paragraph 9,
Except for inline functions and class template specializations, explicit instantiation declarations have the effect of suppressing the implicit instantiation of the entity to which they refer.
This means that an implementation cannot do inline expansion of an extern template function or member function, because that would require its instantiation. As a result, adding an explicit instantiation declaration can affect performance, even though the user only intended to suppress out-of-line copies of functions.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-08-23 00:00:00 | admin | set | messages: + msg2956 |
2010-08-03 00:00:00 | admin | create |