Created on 2013-06-26.00:00:00 last changed 130 months ago
Notes from the February, 2014 meeting:
CWG decided to change the pack expansion of alignas so that the type-id or assignment-expression is repeated inside the parentheses and to change the definition of alignas to accept multiple arguments with the same meaning as multiple alignas specifiers.
The grammar for alignment-specifier in 9.12.1 [dcl.attr.grammar] paragraph 1 is:
where the ellipsis indicates pack expansion. Naively, one would expect that the expansion would result in forms like
alignas() alignas(1, 2) alignas(int, double)
but none of those forms is given any meaning by the current wording. Instead, 13.7.4 [temp.variadic] paragraph 4 says,
In an alignment-specifier (9.12.2 [dcl.align]); the pattern is the alignment-specifier without the ellipsis.
Presumably this means that something like alignas(T...) would expand to something like
alignas(int) alignas(double)
This is counterintuitive and should be reexamined.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | messages: + msg4882 |
2014-03-03 00:00:00 | admin | set | status: open -> drafting |
2013-06-26 00:00:00 | admin | create |