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


1131. Template aliases in elaborated-type-specifiers

Section: 9.2.9.5  [dcl.type.elab]     Status: C++11     Submitter: US     Date: 2010-08-02

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

N3092 comment US 41

The current wording disallows use of typedef-names in elaborated-type-specifiers. This prohibition should also apply to template aliases:

    struct A { };
    template<typename T> using X = A;
    struct X<int>* p2; // ill-formed

Proposed resolution (August, 2010):

Change 9.2.9.5 [dcl.type.elab] paragraph 2 as follows:

...If the identifier resolves to a typedef-name or the simple-template-id resolves to an alias template specialization, the elaborated-type-specifier is ill-formed. [Note:...

[Note: this wording assumes the change from “template alias” to “alias template” requested by comment FI 11 on FCD N3092.]