public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter
@ 2012-08-31 18:09 eric.niebler at gmail dot com
2013-02-22 14:48 ` [Bug c++/54440] " jason at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: eric.niebler at gmail dot com @ 2012-08-31 18:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
Bug #: 54440
Summary: [c++11] g++ prematurely applying rule that a template
parameter pack cannot be followed by a template
parameter
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: eric.niebler@gmail.com
The following code:
template<int...I>
struct S
{
template<template<decltype(I)> class...A, template<int> class B>
struct T;
};
yields:
main.cpp:5:12: error: parameter pack ‘A’ must be at the end of the template
parameter list
I believe this is erroneous, as does clang developer Richard Smith. After S is
instantiated, A instantiates to a non-pack.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/54440] [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter
2012-08-31 18:09 [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter eric.niebler at gmail dot com
@ 2013-02-22 14:48 ` jason at gcc dot gnu.org
2013-06-07 20:16 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-22 14:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-02-22
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-22 14:48:06 UTC ---
Created attachment 29523
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29523
patch
Here's a patch for after 4.8 branches.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/54440] [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter
2012-08-31 18:09 [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter eric.niebler at gmail dot com
2013-02-22 14:48 ` [Bug c++/54440] " jason at gcc dot gnu.org
@ 2013-06-07 20:16 ` paolo.carlini at oracle dot com
2014-01-29 20:07 ` richard-gccbugzilla at metafoo dot co.uk
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-06-07 20:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Hi Jason. Noticed your patch here scheduled for 4.9...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/54440] [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter
2012-08-31 18:09 [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter eric.niebler at gmail dot com
2013-02-22 14:48 ` [Bug c++/54440] " jason at gcc dot gnu.org
2013-06-07 20:16 ` paolo.carlini at oracle dot com
@ 2014-01-29 20:07 ` richard-gccbugzilla at metafoo dot co.uk
2014-02-26 17:09 ` jason at gcc dot gnu.org
2014-02-26 17:10 ` jason at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: richard-gccbugzilla at metafoo dot co.uk @ 2014-01-29 20:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard-gccbugzilla@metafoo
| |.co.uk
--- Comment #3 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
Ping? Can the patch be applied now (or has this missed the boat for 4.9 as
well)?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/54440] [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter
2012-08-31 18:09 [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter eric.niebler at gmail dot com
` (2 preceding siblings ...)
2014-01-29 20:07 ` richard-gccbugzilla at metafoo dot co.uk
@ 2014-02-26 17:09 ` jason at gcc dot gnu.org
2014-02-26 17:10 ` jason at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-26 17:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Feb 26 17:08:20 2014
New Revision: 208178
URL: http://gcc.gnu.org/viewcvs?rev=208178&root=gcc&view=rev
Log:
PR c++/54440
* pt.c (get_template_parm_index): New.
(fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
(process_template_parm): Allow bare packs in template template
parm template parms.
(coerce_template_parameter_pack): Handle fixed template template
parm packs and fixed packs not at the end of the parm list.
(coerce_template_parms): Handle template parm packs not at the end
of the parm list.
(gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic151.C
trunk/gcc/testsuite/g++.dg/cpp0x/variadic152.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/g++.dg/cpp0x/variadic74.C
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/54440] [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter
2012-08-31 18:09 [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter eric.niebler at gmail dot com
` (3 preceding siblings ...)
2014-02-26 17:09 ` jason at gcc dot gnu.org
@ 2014-02-26 17:10 ` jason at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-26 17:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Applied (with minor tweaks).
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-26 17:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 18:09 [Bug c++/54440] New: [c++11] g++ prematurely applying rule that a template parameter pack cannot be followed by a template parameter eric.niebler at gmail dot com
2013-02-22 14:48 ` [Bug c++/54440] " jason at gcc dot gnu.org
2013-06-07 20:16 ` paolo.carlini at oracle dot com
2014-01-29 20:07 ` richard-gccbugzilla at metafoo dot co.uk
2014-02-26 17:09 ` jason at gcc dot gnu.org
2014-02-26 17:10 ` jason at gcc dot gnu.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).