Title
Explicit instantiation and trailing requires-clauses
Status
drafting
Section
13.9.3 [temp.explicit]
Submitter
Davis Herring

Created on 2021-08-09.00:00:00 last changed 24 months ago

Messages

Date: 2022-11-20.07:54:16

CWG 2022-11-10

For each explicit instantiation, there shall be exactly one member whose constraints are more specialized than any other member with the same signature. Use the "address of function" model to determine this member.

Date: 2021-11-15.00:00:00

Notes from the November, 2021 teleconference:

Issue 2488 is being reopened due to subsequent comments.

Date: 2021-08-09.00:00:00

CWG determined that issue 2488 was not a defect. However, the discussion uncovered an issue regarding the handling of an explicit instantiation of a class template containing such members. According to 13.9.3 [temp.explicit] paragraph 10,

An explicit instantiation that names a class template specialization is also an explicit instantiation of the same kind (declaration or definition) of each of its direct non-template members that has not been previously explicitly specialized in the translation unit containing the explicit instantiation, provided that the associated constraints, if any, of that member are satisfied by the template arguments of the explicit instantiation (13.5.3 [temp.constr.decl], 13.5.2 [temp.constr.constr]), except as described below.

Paragraph 12 says,

An explicit instantiation of a prospective destructor (11.4.7 [class.dtor]) shall correspond to the selected destructor of the class.

Perhaps the virtual and constrained members could be handled in an analogous fashion.

History
Date User Action Args
2022-11-20 07:54:16adminsetmessages: + msg7043
2022-11-20 07:54:16adminsetstatus: open -> drafting
2021-11-15 00:00:00adminsetmessages: + msg6558
2021-08-09 00:00:00admincreate