Created on 2012-01-02.00:00:00 last changed 130 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (October, 2012):
Change 9.12.2 [dcl.align] paragraph 1 as follows:
An alignment-specifier may be applied to a variable or to a class data member, but it shall not be applied to a bit-field, a function parameter,the formal parameter of a catch clausean exception-declaration (14.4 [except.handle]), or a variable declared with the register storage class specifier. An alignment-specifier may also be applied to the declarationof a class or enumeration typeor definition of a class (in an elaborated-type-specifier (9.2.9.5 [dcl.type.elab]) or class-head ( Clause 11 [class]), respectively) and to the declaration or definition of an enumeration (in an opaque-enum-declaration or enum-head, respectively (9.7.1 [dcl.enum])). An alignment-specifier with an ellipsis is a pack expansion (13.7.4 [temp.variadic]).
Consider the following:
struct S { int i; }; using A alignas(alignof(long long)) = S;
9.12.2 [dcl.align] paragraph 1 allows an alignment-specifier to be applied to the declaration of a class or enumeration type, which A arguably is. The specification should be clarified to indicate that such a usage is not permitted, however.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4399 |
2013-05-03 00:00:00 | admin | set | status: ready -> dr |
2012-11-03 00:00:00 | admin | set | status: review -> ready |
2012-09-24 00:00:00 | admin | set | status: drafting -> review |
2012-02-27 00:00:00 | admin | set | messages: + msg3766 |
2012-02-27 00:00:00 | admin | set | status: open -> drafting |
2012-01-02 00:00:00 | admin | create |