Open
Description
The following valid program is rejected by clang but accepted by both gcc and msvc. Demo
constexpr std::size_t Required=16;
int iarr [10] alignas(Required);
Clang says:
<source>:16:15: error: 'alignas' attribute cannot be applied to types
16 | int iarr [10] alignas(Required);
|
Note that if you move [10]
to after alignas(Required)
then clang also starts accepting.