This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49593] New: [C++0x] cannot use T{t}... as pack expansion
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 30 Jun 2011 14:55:19 +0000
- Subject: [Bug c++/49593] New: [C++0x] cannot use T{t}... as pack expansion
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: redi@gcc.gnu.org
CC: jason@gcc.gnu.org
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