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

2024-12-19


552. Use of typename in the type in a non-type parameter-declaration

Section: 13.3  [temp.names]     Status: NAD     Submitter: Andre Morozov     Date: 15 December 2005

The discussion in of the use of typename with a qualified-id in a template parameter-declaration in 13.3 [temp.names] paragraph 2 is confusing:

typename followed by an unqualified-id names a template type parameter. typename followed by a qualified-id denotes the type in a non-type parameter-declaration.

This rule would be clearer if the unqualified-id case were described in terms of resolving the ambiguity of declaring a template parameter name versus referring to a type-name from the enclosing scope, and if the qualified-id case referred to the use of the typename keyword with dependent types in 13.8 [temp.res]. An example would also be helpful.

Rationale (April, 2006):

The CWG felt that the wording was already clear enough.