On Sat, Dec 22, 2012 at 9:53 AM, Dodji Seketeli <do...@redhat.com> wrote:
> Gabriel Dos Reis <g...@integrable-solutions.net> writes:
>
>> Thank you very much for the explanation; your previous message
>> makes sense to me now.
>
> You are welcome.
>
>> The question I have is why are we using TREE_TYPE of a TEMPLATE_DECL
>> to represent the current instantiation of a template alias?
>
> My understanding is that in the instantiation at line 7 below
>
>      1  template<typename>
>      2  using A = int;
>      3
>      4  template<template<class> class>
>      5  struct B {};
>      6
>      7  B<A> b;
>
> check_instantiated_arg is not looking at the current instantiation of
> the template alias A.  Rather, it is looking at the template-name A
> (which resolved, IMHO rightfully, to the decl for A which happens to be
> a TEMPLATE_DECL).  This seems consistent with the fact that the
> parameter of B is a template itself so its argument ought to be
> template-name, rather than a template instantiation.

Sorry for the confusion, "current instantiation" was the wrong word.
What I meant to say was that the use and interpretation of TREE_TYPE
is very confusing in this context.

-- Gaby

Reply via email to