Title
alignas in alias-declaration
Status
cd3
Section
9.2.4 [dcl.typedef]
Submitter
Daveed Vandevoorde

Created on 2012-01-02.00:00:00 last changed 90 months ago

Messages

Date: 2013-04-15.00:00:00

[Moved to DR at the April, 2013 meeting.]

Date: 2012-10-15.00:00:00

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 clause an 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 declaration of a class or enumeration type or definition of a class (in an elaborated-type-specifier (9.2.9.4 [dcl.type.elab]) or class-head (Clause 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]).
Date: 2012-01-02.00:00:00

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:00adminsetstatus: drwp -> cd3
2013-10-14 00:00:00adminsetstatus: dr -> drwp
2013-05-03 00:00:00adminsetmessages: + msg4399
2013-05-03 00:00:00adminsetstatus: ready -> dr
2012-11-03 00:00:00adminsetstatus: review -> ready
2012-09-24 00:00:00adminsetstatus: drafting -> review
2012-02-27 00:00:00adminsetmessages: + msg3766
2012-02-27 00:00:00adminsetstatus: open -> drafting
2012-01-02 00:00:00admincreate