From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17886 invoked by alias); 22 Feb 2008 17:41:33 -0000 Received: (qmail 17262 invoked by uid 48); 22 Feb 2008 17:40:51 -0000 Date: Fri, 22 Feb 2008 17:41:00 -0000 Subject: [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rodolfo at rodsoft dot org" 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: 2008-02/txt/msg02350.txt.bz2 Hi, the following code fails to compile with gcc-4.3-20080215 template struct test {}; int main() { test<> a; return 0; } According to N2242 section 3.6, page 7: If a template-parameter of a class template has a default template-argument, each subsequent template-parameter shall either have a default template-argument supplied or be a template parameter pack. If a template-parameter of a class template is a template parameter pack, it must be the last template-parameter. The compiler issues the following error: no default argument for ‘ARGS’ at line 1 above. -- Summary: Compiling error with variadic template with fixed parameter with default type. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rodolfo at rodsoft dot org GCC build triplet: *-*-*-* GCC host triplet: *-*-*-* GCC target triplet: *-*-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35297