http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55232



             Bug #: 55232

           Summary: [C++0x] Compilation fails if expanding function param

                    pack in initializer_list

    Classification: Unclassified

           Product: gcc

           Version: 4.7.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: breakpo...@f5soft.com





Compilation of following source code gives error message:



"Compiling: main.cpp

'

in dependent_type_p, at cp/pt.c:19321"



Source code:



#include <vector>

#include <list>



using namespace std;



template< class... T >

struct X : T...

{

    void push_back( typename T::value_type ... vals )

    {

        initializer_list<int> li = { (T::push_back(vals), 1)... };  //Fail

    }

};



int main()

{

    X< vector<double>, list<int> > x;

    x.push_back(1.1, 2);

    return 0;

}

Reply via email to