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: [RFC] PR c++/43206


On 03/24/2010 12:13 PM, Dodji Seketeli wrote:
On Tue, Mar 23, 2010 at 11:57:59AM -0400, Jason Merrill wrote:
I'm uncomfortable setting DECL_CONTEXT to an invalid value, even
temporarily.  Can we just assume in
get_template_parms_of_dependent_type that the parm is part of
current_template_parms if it doesn't have DECL_CONTEXT set?

Consider:


template<class T0, T1>
struct S
{
     template<class U>
     T1 //#0
     foo(T0, T1);
};

template<class T0, T1>  template<class U>
T1 //#2
S<T0, T1>::foo(T0, T1);

using the current_template_parms variable makes T1#0 and T1#1 compare
different.

Why? I suppose you'd need to make sure you're getting the right level of parms, but that's certainly doable.


Jason


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