From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28647 invoked by alias); 15 May 2009 02:55:50 -0000 Received: (qmail 28605 invoked by uid 48); 15 May 2009 02:55:38 -0000 Date: Fri, 15 May 2009 02:55:00 -0000 Subject: [Bug c++/40155] New: [c++1x] variadic template pack problem X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bangerth at gmail dot com" 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: 2009-05/txt/msg01291.txt.bz2 I'm fairly sure this should compile but it doesn't: --------------------- template struct identity { typedef T type; }; template int forward_call(RT (*) (A...), typename identity::type...); int g (double); int i = forward_call(&g, 0); ------------------------------------- The problem is the expansion typename identity::type... which should wrap identity::type around each element An of the template pack A. I'm not entirely familiar with all the rules for template packs yet, but I think that this should work, taking the examples in http://www.jot.fm/issues/issue_2008_02/article2/ into account. Best W. -- Summary: [c++1x] variadic template pack problem Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bangerth at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40155