Title
Agreement of dependent alignas specifiers
Status
nad
Section
9.12.2 [dcl.align]
Submitter
Richard Smith

Created on 2013-02-22.00:00:00 last changed 140 months ago

Messages

Date: 2013-04-15.00:00:00

Rationale (April, 2013):

9.12.2 [dcl.align] paragraph 6 requires that the alignments be “equivalent,” which in a dependent context is specified by 13.7.7.2 [temp.over.link] paragraph 5. The expressions in this example are not equivalent.

Date: 2022-11-20.07:54:16

Although 9.12.2 [dcl.align] paragraph 6 requires that all declarations of a given entity must have the same alignment, enforcing that requirement for class templates would require instantiating all declarations of the template, a process not otherwise needed. For example:

   template<int M, int N> struct alignas(M) X;
   template<int M, int N> struct alignas(N) X {};

The same problem would presumably afflict any attribute applied to a class template.

History
Date User Action Args
2013-05-03 00:00:00adminsetmessages: + msg4439
2013-05-03 00:00:00adminsetstatus: open -> nad
2013-02-22 00:00:00admincreate