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
A template-declaration should, but does not, introduce the identifier in its declarator-id as a template-name. Subclause 13.2 [temp.param] paragraph 3 already does so for template template-parameters.
Possible resolution (based on issue 2862):
Change in 9.2.4 [dcl.typedef] paragraph 2 as follows:
A typedef-name can also be introduced by an alias-declaration. The identifier following the using keyword is not looked up; if the alias-declaration does not introduce an alias template (13.1 [temp.pre]), the identifieritbecomes a typedef-nameand the. The optional attribute-specifier-seq following the identifier appertains to that typedef-name or, if the identifier is a template-name, to that template-name. Such a typedef-name has the same semantics as if it were introduced by the typedef specifier. In particular, it does not define a new type.
Change in 11.1 [class.pre] paragraph 1 as follows:
A class is a type.Its name becomes a class-name (11.3 [class.name]) within its scope.class-name : identifier simple-template-id... Otherwise, the class-name is an identifier; it is not looked up, and if the class-specifier does not introduce a class template (13.1 [temp.pre]), the class-specifier introducesitthe identifier as a class-name.
Change in 13.1 [temp.pre] paragraph 3 as follows:
The declaration of a class template, alias template, or variable template introduces its respective name as a template-name.
- A class template is introduced by a template-declaration whose declaration is a simple-declaration that either contains a class-specifier in its decl-specifier-seq or consists solely of an elaborated-type-specifier.
- A function template is introduced by a template-declaration whose declaration declares a function.
- An alias template is introduced by a template-declaration whose declaration is an alias-declaration.
- A variable template is introduced by a template-declaration whose declaration declares a variable.
Change in 13.7.8 [temp.alias] paragraph 1 as follows:
A template-declaration in which the declaration is an alias-declaration (9.1 [dcl.pre]) declares the identifier to be an alias template. An alias template is a name for a family of types.The name of the alias template is a template-name.
Change in 13.7.9 [temp.concept] paragraph 2 as follows:
A concept-definition declares a concept. Its identifier becomes a template-name and a concept-name referring to that concept within its scope. The optional attribute-specifier-seq appertains to the concept.
Change in 13.3 [temp.names] paragraph 3 as follows:
[ Note:If the name is an identifier, it is then interpreted as a template-name. [ Note: The keyword template is used to indicate that a dependent qualified name (13.8.3.2 [temp.dep.type]) denotes a template where an expression might appear. —end note]