On 11/30/2011 06:32 AM, Dodji Seketeli wrote:
Here is an example of what I had in mind for keeping the walking of the
underlying type there:

     template<class ... T>
     struct S {};

     template<class ... T>
     using A = S<T>;//#1<-- I think we should error here.

We certainly should; we do need to walk the pattern at the point of definition. I meant that when we see a use of a typedef or alias template we don't need to walk the underlying type.

When we are in #1, in the process of building the template info for A,
push_template_decl_real_1 calls check_for_bare_parameter_packs, which
then call the code you are referring to.  If we don't walk the
underlying type there, we miss spotting the use the of the bare
parameter pack T.  Or am I miss-considering something?

I guess let's check DECL_ORIGINAL_TYPE instead of TREE_TYPE for alias templates.

Jason

Reply via email to