public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error
@ 2011-11-16 20:50 trashyankes at wp dot pl
2011-11-23 18:53 ` [Bug c++/51180] [C++0x] " trashyankes at wp dot pl
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: trashyankes at wp dot pl @ 2011-11-16 20:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
Bug #: 51180
Summary: [C++0x][C++11] inner class alias-definition variadic
template error
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: trashyankes@wp.pl
gcc version 4.7.0 20111108 (experimental) (niXman build)
code:
---------------------------
---------------------------
template<class, class>
struct t2 //error: provided for 'template<class, class> struct t2'
{
};
template<template<class...> class M>
struct m
{
template<class... B>
using inner = M<B...>; //error: wrong number of template arguments (1, should
be 2)
};
m<t2> sta2;
---------------------------
---------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/51180] [C++0x] inner class alias-definition variadic template error
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
@ 2011-11-23 18:53 ` trashyankes at wp dot pl
2011-12-01 19:25 ` dodji at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: trashyankes at wp dot pl @ 2011-11-23 18:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
--- Comment #1 from trashyankes at wp dot pl 2011-11-23 18:34:43 UTC ---
I find easy workaround this bug.
---------------------------
---------------------------
template<template<class...> class M>
struct m
{
template<class... B>
struct _inner_fix
{
typedef M<B...> type
}
template<class... B>
using inner = typename _inner_fix<B...>::type;
};
---------------------------
---------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/51180] [C++0x] inner class alias-definition variadic template error
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
2011-11-23 18:53 ` [Bug c++/51180] [C++0x] " trashyankes at wp dot pl
@ 2011-12-01 19:25 ` dodji at gcc dot gnu.org
2011-12-01 19:42 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-01 19:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-12-01
AssignedTo|unassigned at gcc dot |dodji at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-01 19:25:02 UTC ---
This is somewhat related to PR c++/51239. I think at some point
during the substituting of t2 in to m, we should leave t2<B...>
"unbound" instead of trying to substitute B... into it.
The proper substituting of t2<B...> would happen later when B... has a
proper matching argument pack.
I am working on a joint patch for this and PR c++/51239.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/51180] [C++0x] inner class alias-definition variadic template error
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
2011-11-23 18:53 ` [Bug c++/51180] [C++0x] " trashyankes at wp dot pl
2011-12-01 19:25 ` dodji at gcc dot gnu.org
@ 2011-12-01 19:42 ` jason at gcc dot gnu.org
2011-12-02 10:16 ` dodji at seketeli dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2011-12-01 19:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-12-01 19:41:33 UTC ---
(In reply to comment #2)
> This is somewhat related to PR c++/51239. I think at some point
> during the substituting of t2 in to m, we should leave t2<B...>
> "unbound" instead of trying to substitute B... into it.
I'm surprised that it doesn't just work already; writing t2<B...> already
works, doing the substitution ought to work the same way.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/51180] [C++0x] inner class alias-definition variadic template error
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
` (2 preceding siblings ...)
2011-12-01 19:42 ` jason at gcc dot gnu.org
@ 2011-12-02 10:16 ` dodji at seketeli dot org
2011-12-03 17:26 ` dodji at gcc dot gnu.org
2013-10-04 10:59 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: dodji at seketeli dot org @ 2011-12-02 10:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
--- Comment #4 from dodji at seketeli dot org <dodji at seketeli dot org> 2011-12-02 10:15:06 UTC ---
"jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> a écrit:
> I'm surprised that it doesn't just work already; writing t2<B...> already
> works, doing the substitution ought to work the same way.
It wasn't working in this case because we are getting into the "if"
below in coerce_template_parms:
if ((nargs > nparms && !variadic_p)
|| (nargs < nparms - variadic_p
&& require_all_args
&& (!use_default_args
|| (TREE_VEC_ELT (parms, nargs) != error_mark_node
&& !TREE_PURPOSE (TREE_VEC_ELT (parms, nargs))))))
{
We are getting there because the number of arguments of t2 in that
case is smaller than its number of parms.
I am still tweaking other parts of the patch to make it pass bootstrap
and testing.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/51180] [C++0x] inner class alias-definition variadic template error
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
` (3 preceding siblings ...)
2011-12-02 10:16 ` dodji at seketeli dot org
@ 2011-12-03 17:26 ` dodji at gcc dot gnu.org
2013-10-04 10:59 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-12-03 17:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
--- Comment #5 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-12-03 17:25:02 UTC ---
A candidate patch for this has been submitted to
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00163.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/51180] [C++0x] inner class alias-definition variadic template error
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
` (4 preceding siblings ...)
2011-12-03 17:26 ` dodji at gcc dot gnu.org
@ 2013-10-04 10:59 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-04 10:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51180
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Dodji, any progress on this? Looks like Part 1 of the latest patch set still
needs work? http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00728.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-04 10:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16 20:50 [Bug c++/51180] New: [C++0x][C++11] inner class alias-definition variadic template error trashyankes at wp dot pl
2011-11-23 18:53 ` [Bug c++/51180] [C++0x] " trashyankes at wp dot pl
2011-12-01 19:25 ` dodji at gcc dot gnu.org
2011-12-01 19:42 ` jason at gcc dot gnu.org
2011-12-02 10:16 ` dodji at seketeli dot org
2011-12-03 17:26 ` dodji at gcc dot gnu.org
2013-10-04 10:59 ` paolo.carlini at oracle dot com
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).