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

2024-04-18


1602. Linkage of specialization vs linkage of template arguments

Section: 13.9.2  [temp.inst]     Status: review     Submitter: Richard Smith     Date: 2013-01-09

The Standard does not appear to specify the linkage of a template specialization. 13.9.2 [temp.inst] paragraph 11 does say,

Implicitly instantiated class and function template specializations are placed in the namespace where the template is defined.

which could be read as implying that the specialization has the same linkage as the template itself. Implementation practice seems to be that the weakst linkage of the template and the arguments is used for the specialization.

Additional notes (February, 2023)

Template specializations do not have linkage.