This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51180] [C++0x] inner class alias-definition variadic template error


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]