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

Reply via email to