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



Jonathan Wakely <redi at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

           Keywords|                            |ice-on-valid-code

             Status|RESOLVED                    |NEW

   Last reconfirmed|                            |2012-11-07

      Known to work|4.7.2, 4.8.0                |

         Resolution|WORKSFORME                  |

            Summary|[C++0x] Compilation fails   |[C++11] Compilation fails

                   |if expanding function param |if expanding function param

                   |pack in initializer_list    |pack in initializer_list

     Ever Confirmed|0                           |1



--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-07 
13:52:34 UTC ---

It only fails with warnings enabled.



Reduced:



struct vector

{

    typedef double value_type;



    int push_back() { return 0; }

};



template< class... T >

struct X : T...

{

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

    {

        int li[] = { T::push_back()... };  //Fail

    }

};



int main()

{

    X< vector > x;

    x.push_back(2);

    return 0;

}

Reply via email to