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

2023-01-15


1009. Missing cases in the declarator-id of a function template declaration

Section: Clause 13  [temp]     Status: C++11     Submitter: Johannes Schaub     Date: 2009-11-28

[Voted into the WP at the November, 2010 meeting.]

According to Clause 13 [temp] paragraph 2,

In a function template declaration, the last component of the declarator-id shall be a template-name or operator-function-id (i.e., not a template-id).

This is too restrictive; it should also allow conversion-function-ids and literal-operator-ids.

Proposed resolution (September, 2010):

Change Clause 13 [temp] paragraph 2 as follows:

A template-declaration can appear only as a namespace scope or class scope declaration. In a function template declaration, the last component of the declarator-id shall not be a template-id template-name or operator-function-id (i.e., not a template-id). [Note: in That last component may be an identifier, an operator-function-id, a conversion-function-id, or a literal-operator-id. In a class template declaration, if the class name is a simple-template-id, the declaration declares a class template partial specialization (13.7.6 [temp.spec.partial]). —end note]