From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15986 invoked by alias); 7 Nov 2012 13:52:50 -0000 Received: (qmail 15944 invoked by uid 48); 7 Nov 2012 13:52:34 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55232] [C++11] Compilation fails if expanding function param pack in initializer_list Date: Wed, 07 Nov 2012 13:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords Status Last reconfirmed Known to work Resolution Summary Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00591.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55232 Jonathan Wakely 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 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; }