This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1812. Omission of template in a typename-specifier

Section: 13.3  [temp.names]     Status: C++17     Submitter: Daveed Vandevoorde     Date: 2013-11-18

[Adopted at the February/March, 2017 meeting.]

According to 13.3 [temp.names] paragraph 4,

When the name of a member template specialization appears after . or -> in a postfix-expression or after a nested-name-specifier in a qualified-id, and the object expression of the postfix-expression is type-dependent or the nested-name-specifier in the qualified-id refers to a dependent type, but the name is not a member of the current instantiation ( [temp.dep.type]), the member template name must be prefixed by the keyword template. Otherwise the name is assumed to name a non-template.

This does not seem necessary in a typename-specifier; a < following a qualified-id in a typename-specifier could safely be assumed to begin a template argument list, so the template keyword should be optional in this case. Some implementations already do not enforce this requirement.

See also issue 1710.

Proposed resolution (March, 2017):

This issue is resolved by the resolution of issue 1710.