Created on 2023-04-11.00:00:00 last changed 11 months ago
Proposed resolution (approved by CWG 2023-04-28):
Insert a new paragraph after 13.7.4 [temp.variadic] paragraph 9 as follows:
The instantiation of a sizeof... expression (7.6.2.5 [expr.sizeof]) produces an integral constant with value N.
The instantiation of an alignment-specifier with an ellipsis produces E1 E2 ... EN.
[Accepted as a DR at the June, 2023 meeting.]
Subclause 13.7.4 [temp.variadic] paragraph 11 specifies:
The instantiation of any other pack expansion produces a list of elements E1, E2, ... , EN.
Consider this example:
template<class ...T> struct Align{ alignas(T...) unsigned char buffer[128]; }; Align<int, short> a;
The pack expansion of the alignment-specifier yields alignas(int), alignas(short), an ill-formed list per the grammar in 9.12.1 [dcl.attr.grammar].
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-12-19 10:15:28 | admin | set | status: dr -> drwp |
2023-07-16 13:00:43 | admin | set | status: ready -> dr |
2023-04-28 19:41:23 | admin | set | messages: + msg7260 |
2023-04-28 19:41:23 | admin | set | status: open -> ready |
2023-04-11 00:00:00 | admin | create |