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] Fix PR c++/60573


On 03/26/2014 09:12 PM, Adam Butcher wrote:
+	     Note: cp_binding_level::class_shadowed is used as a predicate to
+	     indicate whether a class scope is a class-defining scope.  We stop
+	     at the first such scope as this will be the currently open class
+	     definition into which the function being declared will be appended;
+	     and therefore the scope into which the synthesized template
+	     parameter list for the declarator should be injected.  */
+
+	  while (scope->kind == sk_class && !scope->class_shadowed)

That doesn't seem reliable either, unfortunately; class_shadowed is populated when names are looked up, so a declarator that refers to a type member of B will cause scope->class_shadowed to be non-null.

Jason


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