Title
Explicit instantiation of class template members
Status
c++11
Section
13.9.3 [temp.explicit]
Submitter
Martin Sebor

Created on 2005-10-29.00:00:00 last changed 130 months ago

Messages

Date: 2010-08-15.00:00:00

[Voted into WP at August, 2010 meeting.]

Date: 2010-02-15.00:00:00

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 members whose definition is visible that have been defined at the point of instantiation.
Date: 2006-04-15.00:00:00

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.”

Date: 2005-10-29.00:00:00

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:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetstatus: wp -> fdis
2010-11-29 00:00:00adminsetstatus: dr -> wp
2010-08-23 00:00:00adminsetmessages: + msg2928
2010-08-23 00:00:00adminsetstatus: review -> dr
2010-02-16 00:00:00adminsetmessages: + msg2561
2010-02-16 00:00:00adminsetstatus: drafting -> review
2006-04-22 00:00:00adminsetmessages: + msg1337
2006-04-22 00:00:00adminsetstatus: open -> drafting
2005-10-29 00:00:00admincreate