public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type.
@ 2008-02-22 17:41 rodolfo at rodsoft dot org
2008-02-24 1:50 ` [Bug c++/35297] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: rodolfo at rodsoft dot org @ 2008-02-22 17:41 UTC (permalink / raw)
To: gcc-bugs
[-- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35297] Compiling error with variadic template with fixed parameter with default type.
2008-02-22 17:41 [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type rodolfo at rodsoft dot org
@ 2008-02-24 1:50 ` pinskia at gcc dot gnu dot org
2008-12-29 6:46 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-24 1:50 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35297
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35297] Compiling error with variadic template with fixed parameter with default type.
2008-02-22 17:41 [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type rodolfo at rodsoft dot org
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-29 6:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-29 06:44 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.4.0
Last reconfirmed|0000-00-00 00:00:00 |2008-12-29 06:44:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35297
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35297] Compiling error with variadic template with fixed parameter with default type.
2008-02-22 17:41 [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type rodolfo at rodsoft dot org
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
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-06 16:17 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-12-29 06:44:53 |2009-01-06 16:17:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35297
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35297] Compiling error with variadic template with fixed parameter with default type.
2008-02-22 17:41 [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type rodolfo at rodsoft dot org
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-07 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jason at gcc dot gnu dot org 2009-01-07 20:43 -------
Subject: Bug 35297
Author: jason
Date: Wed Jan 7 20:43:01 2009
New Revision: 143166
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143166
Log:
PR c++/35297
PR c++/35477
PR c++/35784
PR c++/36846
PR c++/38276
* pt.c (check_default_tmpl_args): Don't complain about
out-of-order parameter packs in the enclosing class
or parameter packs after default args.
(coerce_template_parms): If we have more than one
parameter pack, don't flatten argument packs.
(template_args_equal): Handle argument packs.
(comp_template_args): Don't flatten argument packs.
(check_instantiated_arg): Split out from...
(check_instantiated_args): Here. Handle arg packs.
(convert_template_argument): Just check that nontype argument
packs have the right type.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic92.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic93.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/variadic65.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic82.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic83.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35297
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35297] Compiling error with variadic template with fixed parameter with default type.
2008-02-22 17:41 [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type rodolfo at rodsoft dot org
` (3 preceding siblings ...)
2009-01-07 20:43 ` jason at gcc dot gnu dot org
@ 2009-01-07 20:56 ` jason at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-07 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jason at gcc dot gnu dot org 2009-01-07 20:56 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35297
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-01-07 20:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-22 17:41 [Bug c++/35297] New: Compiling error with variadic template with fixed parameter with default type rodolfo at rodsoft dot org
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
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).