This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] PR c++/42824


On 01/31/2010 04:20 PM, Dodji Seketeli wrote:
On Sun, Jan 31, 2010 at 03:29:52PM -0500, Jason Merrill wrote:
On 01/31/2010 02:40 PM, Dodji Seketeli wrote:
Ah. I think as Wrap<Quan<V2> > is a partial specialization

It is not.

Sorry, I meant partial instantiation as in the comment in lookup_template_class.

Ah, I see.


Eval<Mrtl>::Wrap is a partial instantiation of Eval<T>::Wrap.

Eval<Mrtl>::Wrap<Quan<0> > is a full instantiation of that partial instantiation.

Eval<Mrtl>::Wrap<Quan<V2> > is also a full instantiation of Eval<Mrtl>::Wrap, but it appears in the signature of the partial instantiation Eval<Mrtl>::value #0, and is still a dependent type after the partial instantiation of that function signature.

I guess the bug is that lookup_template_class fails to make this distinction, and thinks that it too is a partial instantiation. That is, this code:

      /* This type is a "partial instantiation" if any of the template
         arguments still involve template parameters.  Note that we set
         IS_PARTIAL_INSTANTIATION for partial specializations as
         well.  */
      is_partial_instantiation = uses_template_parms (arglist);

Is wrong. I guess it ought to compare the innermost args with the innermost args of the template, instead.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]