Title
Missing requirement for template definitions
Status
c++11
Section
Clause [13] [temp]
Submitter
Daniel Krügler

Created on 2010-07-28.00:00:00 last changed 122 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting.]

Date: 2011-01-15.00:00:00

Proposed resolution (January, 2011):

Add the following as a new paragraph following Clause 13 [temp] paragraph 5:

A function template, member function of a class template, or static data member of a class template shall be defined in every translation unit in which it is implicitly instantiated (13.9.2 [temp.inst]), unless the corresponding specialization is explicitly instantiated (13.9.3 [temp.explicit]) in some translation unit; no diagnostic is required.
Date: 2020-12-15.00:00:00

The removal of the export keyword inadvertently deleted the text (previously found in Clause 13 [temp] paragraph 8 of the 2003 Standard),

A non-exported template must be defined in every translation unit in which it is implicitly instantiated (13.9.2 [temp.inst]), unless the corresponding specialization is explicitly instantiated (13.9.3 [temp.explicit]) in some translation unit; no diagnostic is required.

This requirement must be reinstated.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3377
2011-04-10 00:00:00adminsetstatus: tentatively ready -> fdis
2011-02-28 00:00:00adminsetmessages: + msg3235
2011-02-28 00:00:00adminsetstatus: drafting -> tentatively ready
2010-11-29 00:00:00adminsetstatus: open -> drafting
2010-07-28 00:00:00admincreate