Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-20


1437.alignas inalias-declaration

Section:9.2.4  [dcl.typedef]    Status:CD3    Submitter:Daveed Vandevoorde    Date:2012-01-02

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

Consider the following:

    struct S { int i; };    using A alignas(alignof(long long)) = S;

9.13.2 [dcl.align] paragraph 1 allows analignment-specifierto be applied to the declaration of a class or enumeration type, whichA arguably is. The specification should be clarified to indicatethat such a usage is not permitted, however.

Proposed resolution (October, 2012):

Change 9.13.2 [dcl.align] paragraph 1 as follows:

Analignment-specifier may be applied to a variable or to aclass data member, but it shall not be applied to a bit-field, afunction parameter,the formal parameter of a catch clauseanexception-declaration (14.4 [except.handle]), or a variable declared with theregisterstorage class specifier. Analignment-specifier may also beapplied to the declarationof a class or enumeration typeor definition of a class (in anelaborated-type-specifier(9.2.9.5 [dcl.type.elab]) orclass-head (Clause 11 [class]), respectively) and to the declaration ordefinition of an enumeration (in anopaque-enum-declaration orenum-head, respectively (9.8.1 [dcl.enum])). Analignment-specifier with an ellipsis is a pack expansion(13.7.4 [temp.variadic]).



[8]ページ先頭

©2009-2026 Movatter.jp