public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rodolfo at rodsoft dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type. Date: Fri, 22 Feb 2008 17:41:00 -0000 [thread overview] Message-ID: <bug-35297-6196@http.gcc.gnu.org/bugzilla/> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1141 bytes --] Hi, the following code fails to compile with gcc-4.3-20080215 template <class T=int, class... ARGS> 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
next reply other threads:[~2008-02-22 17:41 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-22 17:41 rodolfo at rodsoft dot org [this message] 2008-02-24 1:50 ` [Bug c++/35297] " pinskia at gcc dot gnu dot org 2008-12-29 6:46 ` pinskia at gcc dot gnu dot org 2009-01-06 16:17 ` jason at gcc dot gnu dot org 2009-01-07 20:43 ` jason at gcc dot gnu dot org 2009-01-07 20:56 ` jason at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-35297-6196@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).