http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49593
Summary: [C++0x] cannot use T{t}... as pack expansion
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
template<typename... T>
void f(T...)
{ }
template<typename... Args>
static void
g(Args&&... args)
{
f( static_cast<Args>(args)... );
f( (Args)args... );
f( Args(args)... );
f( Args{args}... ); // ERROR
}
int main()
{
g(1, '2', 3.0);
}
The line marked ERROR fails, it should be equivalent to the previous statement