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.

-- 
                Dodji

Reply via email to