Created on 2018-09-28.00:00:00 last changed 20 months ago
Proposed resolution (February, 2019):
Change 6.6 [basic.link] paragraph 3 as follows:
A name having namespace scope (6.4.5 [basic.scope.namespace]) has internal linkage if it is the name of
a variable, function or function template that is explicitly declared static; or,
a non-inline variable of non-volatile const-qualified type that is neither explicitly declared extern nor previously declared to have external linkage; or
a data member of an anonymous union.
Notes from the December, 2018 teleconference:
CWG felt that a const type should not affect the linkage of a variable template or its instances.
[Accepted as a DR at the February, 2019 meeting.]
The list in 6.6 [basic.link] paragraph 3 specifying which entities receive internal linkage does not mention variable templates, so presumably a variable template has external linkage. Clause 13 [temp] paragraph 6 gives the impression that a specialization of a template with external linkage also has external linkage. However, current implementations appear to give internal linkage to specializations of const-qualified variable templates. Should const-qualified variable templates have internal linkage?
|2020-12-15 00:00:00||admin||set||messages: + msg6361|
|2020-12-15 00:00:00||admin||set||messages: + msg6360|