This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Voted into WP at August, 2010 meeting.]
Issue 470 specified the explicitinstantiation of members of explicitly-instantiated class templates.In restricting the affected members to those “whose definitionis visible at the point of instantiation,” however, thisresolution introduced an incompatibility between explicitlyinstantiating a member function or static data member and explicitlyinstantiating the class template of which it is a member (13.9.3 [temp.explicit] paragraph 3 requires only that the class templatedefinition, not that of the member function or static data member, bevisible at the point of the explicit instantiation). It would bebetter to treat the member instantiations the same, regardless ofwhether they are directly or indirectly explicitly instantiated.
Notes from the April, 2006 meeting:
In forwarding document J16/06-0057 = WG21 N1987 to be approved bythe full Committee, the CWG reaffirmed its position that explicitlyinstantiating a class template only explicitly instantiates those ofits members that have been defined before the point of the explicitinstantiation. The effect of the position advocated above would be torequire all non-exported member functions to be defined in thetranslation unit in which the class template is explicitlyinstantiated (cf paragraph 4), and we did not want to require that.We did agree that the “visible” terminology should bereplaced by wording along the lines of “has beendefined.”
Proposed resolution (February, 2010):
Change 13.9.3 [temp.explicit] paragraph 8 as follows:
An explicit instantiation definition that names a class templatespecialization explicitly instantiates the class templatespecialization and is only an explicit instantiation definitionof memberswhose definition is visiblethat havebeen defined at the point of instantiation.