This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


1713. Linkage of variable template specializations

Section: 9.11  [dcl.link]     Status: dup     Submitter: Richard Smith     Date: 2013-07-08

Given a namespace-scope declaration like

  template<typename T> T var = T();

should T<const int> have internal linkage by virtue of its const-qualified type? Or should it inherit the linkage of the template?

Notes from the February, 2014 meeting:

CWG noted that linkage is by name, and a specialization of a variable template does not have a name separate from that of the variable template, thus the specialization will have the linkage of the template.

Rationale (February, 2021):

This issue is a duplicate of, and resolved by the resolution of, issue 2387.