From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14809 invoked by alias); 9 Jan 2013 10:39:47 -0000 Received: (qmail 13253 invoked by uid 48); 9 Jan 2013 10:39:29 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55914] [C++11] Pack expansion for class member expression fails in lambda expressions Date: Wed, 09 Jan 2013 10:39: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: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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" Content-Transfer-Encoding: quoted-printable 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: 2013-01/txt/msg00760.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55914 --- Comment #2 from Daniel Kr=C3=BCgler 2013-01-09 10:39:29 UTC --- (In reply to comment #1) > I suspect this is just a different manifestation of PR41933. Thanks Paolo, I partially agree. Indeed the problem is not depending on cla= ss member expressions (so the issue title should be fixed), a simplified examp= le can be written as: //-------------------- struct S {}; template void evaluate(Args...){} template void bar(Args... args) { evaluate(args...); // OK auto lmb =3D [=3D](){ evaluate(args...); }; // Error lmb(); } int main() { S s{}; bar(s); } //-------------------- with the error: "9|error: parameter packs not expanded with '...':| 9|note: 'args'| 9|error: expansion pattern 'args' contains no argument packs| |In instantiation of 'void bar(Args ...) [with Args =3D {S}]':| 15|required from here| 9|error: using invalid field 'bar(Args ...)::__lambda0::__args'|" The reason why I hesitate to agree with that being a dup of bug 41933 is du= e to the fact that the corresponding example there depends on a language extensi= on described in http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#904 that is not part of C++11. I do think though, that my revised example above= is indeed conforming C++11 because it does not depend on that grammar extensio= n. Please keep that in mind when considering the category change to DUP, becau= se that would have impact on which versions of gcc to patch. For example, I as= sume that any CWG defect 904 association would presumably not be applied to gcc 4.7.2.