Title
What is a “use” of a class specialization?
Status
open
Section
13.9.3 [temp.explicit]
Submitter
Michael Wong

Created on 2010-03-08.00:00:00 last changed 172 months ago

Messages

Date: 2010-03-08.00:00:00

According to 13.9.3 [temp.explicit] paragraph 10,

An entity that is the subject of an explicit instantiation declaration and that is also used in the translation unit shall be the subject of an explicit instantiation definition somewhere in the program; otherwise the program is ill-formed, no diagnostic required.

The term “used” is too vague and needs to be defined. In particular, “use” of a class template specialization as an incomplete type — to form a pointer, for instance — should not require the presence of an explicit instantiation definition elsewhere in the program.

History
Date User Action Args
2010-03-08 00:00:00admincreate