This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PRs c++/51239, c++/51180 - Better support for unbound alias template specialization
- From: Jason Merrill <jason at redhat dot com>
- To: Dodji Seketeli <dodji at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 05 Dec 2011 10:01:35 -0500
- Subject: Re: [PATCH] PRs c++/51239, c++/51180 - Better support for unbound alias template specialization
- References: <m3aa7bvun7.fsf@redhat.com>
Hmm. I know I'm the one that suggested this approach, but I think I'm
uncomfortable with this minimal change, since code for handling
BOUND_TEMPLATE_TEMPLATE_PARM expects to be able to get a
TEMPLATE_TYPE_PARM_INDEX out of it, and that won't work for the alias
template use.
So I'd like to rename BOUND_TEMPLATE_TEMPLATE_PARM to something more
generic, perhaps TEMPLATE_ID_TYPE, that just takes a template and args.
So existing uses of BOUND_TEMPLATE_TEMPLATE_PARM would be replaced
with a TEMPLATE_ID_TYPE around a TEMPLATE_TEMPLATE_PARM.
At that point it probably makes sense to replace the use of
TEMPLATE_ID_EXPR in TYPENAME_TYPE with TEMPLATE_ID_TYPE.
Does this make sense? Sorry to make more work for you.
Also, rather than pass back unknown_nb_args_p from
coerce_template_parms, let's make it a predicate next to
any_dependent_template_arguments_p and then use it in both places. And
change the name; it took me a little while to realize that "nb" is short
for "number".
Thanks,
Jason