Created on 2010-03-05.00:00:00 last changed 130 months ago
[Voted into the WP at the March, 2011 meeting.]
Proposed resolution (January, 2011):
Change 6.4.2 [basic.scope.pdecl] paragraph 3 as follows:
...The point of declaration ofa templatean alias or alias template immediately followsthe identifier for the alias being declaredthe type-id to which the alias refers.
Notes from the November, 2010 meeting:
The CWG agreed that the point of declaration for both template and non-template cases should be at the semicolon.
The current wording of 6.4.2 [basic.scope.pdecl] does not specify the point of declaration for an alias-declaration (although it does do so in paragraph 3 for a template alias: “The point of declaration of a template alias immediately follows the identifier for the alias being declared”). One might assume that an alias-declaration would be the same, but it's not clear that that is the right resolution (for either declaration, but especially for the alias-declaration).
An alias-declaration is intended to be essentially a different syntactic form of a typedef declaration (9.2.4 [dcl.typedef] paragraph 2). Placing the point of declaration at the trailing semicolon instead of following the name of the alias would allow more compatibility with the capabilities of typedefs, for instance:
struct S { }; namespace N { using S = S; }
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3291 |
2011-04-10 00:00:00 | admin | set | status: tentatively ready -> fdis |
2011-02-28 00:00:00 | admin | set | messages: + msg3222 |
2011-02-28 00:00:00 | admin | set | messages: + msg3221 |
2011-02-28 00:00:00 | admin | set | status: drafting -> tentatively ready |
2010-11-29 00:00:00 | admin | set | status: open -> drafting |
2010-03-05 00:00:00 | admin | create |