[PATCH] PR c++/50852 - Revisit dependant template parameter

Dodji Seketeli dodji@redhat.com
Wed Mar 28 17:10:00 GMT 2012


Jason Merrill <jason@redhat.com> writes:

> On 03/28/2012 11:02 AM, Dodji Seketeli wrote:
>> For:
>>
>>   template<class T, template<class U, T>  class TT>  struct S;
>>
>> the parms of TT do have a level 1 that contains the parm T.  It seems to
>> me that we need T and U to have different levels here, so both cannot
>> have level 1.
>
> Why do we need them to have different levels?  They are parameters of
> different templates.

Then, if U and T have the same level, how do we represent the full set
of template parms up to U for instance? I mean if that TREE_LIST of
parms still has two entries - one for level 1 that contains T and one
for level N (which you say should be 1 as well) that contains U - would
the TREE_PURPOSEs of both entries have a 1 as their level number?

I agree there are parameters of different templates at play here, but it
seems like there are cases when we need to tie them together, like what
lookup_template_class_1 does when the relevant template is a template
template parameter.

What am I missing?

-- 
		Dodji



More information about the Gcc-patches mailing list