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

2024-07-24


1974. Redundant specification of non-type typename-specifier

Section: 13.8  [temp.res]     Status: NAD     Submitter: Hubert Tong     Date: 2014-07-17

Paragraphs 3-4 of 13.8 [temp.res] read, in part,

When a qualified-id is intended to refer to a type that is not a member of the current instantiation (13.8.3.2 [temp.dep.type]) and its nested-name-specifier refers to a dependent type, it shall be prefixed by the keyword typename, forming a typename-specifier. If the qualified-id in a typename-specifier does not denote a type, the program is ill-formed.

If a specialization of a template is instantiated for a set of template-arguments such that the qualified-id prefixed by typename does not denote a type, the specialization is ill-formed.

The former requirement is intended to apply to the definition and the latter to an instantiation of a template, but that intent is not completely clear, leading to the perception that they are redundant.

Rationale (February, 2021):

The specification, now found in 13.8.1 [temp.res.general], particularly in bullet 8.5, is clearer in this regard.