PR c++/43558

Dodji Seketeli dodji@redhat.com
Mon Mar 29 19:58:00 GMT 2010


On Mon, Mar 29, 2010 at 01:16:04PM -0400, Jason Merrill wrote:
> On 03/29/2010 10:16 AM, Dodji Seketeli wrote:
> >During the comparison of the return types of f#1 and f#2, when we
> >consider TT, we want to get the template parms of tmpl#2 and compare
> >them with the template parms of //f#2.
> >The problem is we get the template parms of the most general template
> >tmpl#1 instead.
> >This is because get_template_info called on the context of TT yields the
> >template info of the most general template tmpl#1 so we get the template
> >parms of that tmpl#1 instead of getting the template parms of tmpl#2.
> 
> This just keeps getting more complex...

Indeed :(

> Let's just store a pointer to the list of parms that a particular
> TEMPLATE_TYPE_PARM belongs to in type.maxval.  Basically like your
> last patch that I objected to, but putting the list somewhere other
> than DECL_CONTEXT.

I fail to see how will this help us to get the right template parms of 
the context of the typedef TT. If we do this, I think the
TEMPLATE_TYPE_PARM T in f#2 will have only T in its type.maxval -- just 
like what we have right now -- whereas the template parms of the context 
of TT in tmpl#2 will be {T, EngineTag}. What am I missing?

        Dodji



More information about the Gcc-patches mailing list