This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49593] New: [C++0x] cannot use T{t}... as pack expansion


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]