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


2330. Missing references to variable templates

Section: 13.9  [temp.spec]     Status: CD5     Submitter: Daveed Vandevoorde     Date: 2016-12-06

[Accepted as a DR at the February, 2019 meeting.]

Presumably paragraphs 1-3 of 13.9 [temp.spec] are intended to apply to variable templates, but the term does not appear in the current wording of these paragraphs.

Proposed resolution (November, 2018):

  1. Change 13.9 [temp.spec] paragraph 1 as follows:

  2. The act of instantiating a function, a variable, a class, a member of a class template or a member template is referred to as template instantiation.
  3. Change 13.9 [temp.spec] paragraphs 3 and r as follows:

  4. An explicit specialization may be declared for a function template, a variable template, a class template, a member of a class template or a member template. An explicit specialization declaration is introduced by template<> . In an explicit specialization declaration for a variable template, a class template, a member of a class template or a class member template, the name of the the variable or class that is explicitly specialized shall be a simple-template-id. In the explicit specialization declaration for a function template or a member function template, the name of the function or member function explicitly specialized may be a template-id. [Example:...

    An instantiated template specialization can be either implicitly instantiated (13.9.2 [temp.inst]) for a given argument list or be explicitly instantiated (13.9.3 [temp.explicit]). A specialization is a class, variable, function, or class member that is either instantiated or explicitly specialized (13.9.4 [temp.expl.spec]).