Created on 2005-10-29.00:00:00 last changed 131 months ago
[Voted into WP at August, 2010 meeting.]
Proposed resolution (February, 2010):
Change 13.9.3 [temp.explicit] paragraph 8 as follows:
An explicit instantiation definition that names a class template specialization explicitly instantiates the class template specialization and is only an explicit instantiation definition of memberswhose definition is visiblethat have been defined at the point of instantiation.
Notes from the April, 2006 meeting:
In forwarding document J16/06-0057 = WG21 N1987 to be approved by the full Committee, the CWG reaffirmed its position that explicitly instantiating a class template only explicitly instantiates those of its members that have been defined before the point of the explicit instantiation. The effect of the position advocated above would be to require all non-exported member functions to be defined in the translation unit in which the class template is explicitly instantiated (cf paragraph 4), and we did not want to require that. We did agree that the “visible” terminology should be replaced by wording along the lines of “has been defined.”
Issue 470 specified the explicit instantiation of members of explicitly-instantiated class templates. In restricting the affected members to those “whose definition is visible at the point of instantiation,” however, this resolution introduced an incompatibility between explicitly instantiating a member function or static data member and explicitly instantiating the class template of which it is a member (13.9.3 [temp.explicit] paragraph 3 requires only that the class template definition, not that of the member function or static data member, be visible at the point of the explicit instantiation). It would be better to treat the member instantiations the same, regardless of whether they are directly or indirectly explicitly instantiated.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | status: wp -> fdis |
2010-11-29 00:00:00 | admin | set | status: dr -> wp |
2010-08-23 00:00:00 | admin | set | messages: + msg2928 |
2010-08-23 00:00:00 | admin | set | status: review -> dr |
2010-02-16 00:00:00 | admin | set | messages: + msg2561 |
2010-02-16 00:00:00 | admin | set | status: drafting -> review |
2006-04-22 00:00:00 | admin | set | messages: + msg1337 |
2006-04-22 00:00:00 | admin | set | status: open -> drafting |
2005-10-29 00:00:00 | admin | create |