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


1042. Attributes in alias-declarations

Section: 9.1  [dcl.pre]     Status: C++11     Submitter: Daveed Vandevoorde     Date: 2010-03-04

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

The grammar for an alias-declaration does not have a place for an attribute-specifier, although a typedef declaration does. Since an alias-declaration is essentially a different syntactic form of a typedef declaration (9.2.4 [dcl.typedef] paragraph 2), this could be surprising.

Proposed resolution (February, 2011) [SUPERSEDED]:

  1. Change the grammar in 9.1 [dcl.pre] paragraph 1 as follows:

  2. Change 9.2.4 [dcl.typedef] paragraph 2 as follows:

  3. A typedef-name can also be introduced by an alias-declaration. The identifier following the using keyword becomes a typedef-name and the optional attribute-specifier-seq following the identifier appertains to that typedef-name. It has the same semantics...