https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62136
Bug ID: 62136
Summary: pack expansion failure in an alignment-specifier
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: filip.roseen at gmail dot com
Created attachment 33323
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33323&action=edit
testcase.cpp
template<class... Ts>
struct alignas(Ts...) A { };
int main () {
}
------------------------
The above is valid C++ according to [temp.variadic]p4, and should not be
rejected, `gcc` however issues the following diagnostic:
testcase.cpp:2:18: error: expected ‘)’ before ‘...’ token
struct alignas(Ts...) A { };
^
testcase.cpp:2:18: error: expected ‘)’ before ‘...’ token
testcase.cpp:2:18: error: expected identifier before ‘...’ token
testcase.cpp:2:18: error: expected unqualified-id before ‘...’ token
testcase.cpp:2:28: warning: extra ‘;’ [-Wpedantic]
struct alignas(Ts...) A { };
^