On 02/19/2014 10:00 PM, Adam Butcher wrote:
+  if (current_template_parms)
+    {
+      cp_binding_level *maybe_tmpl_scope = current_binding_level->level_chain;
+      while (maybe_tmpl_scope && maybe_tmpl_scope->kind == sk_class)
+       maybe_tmpl_scope = maybe_tmpl_scope->level_chain;
+      if (maybe_tmpl_scope && maybe_tmpl_scope->kind == sk_template_parms)
+       declaring_template_p = true;
+    }

Won't this return true for a member function of a class template?  i.e.

template <class T>
struct A {
  void f(auto x);
};

Why doesn't num_template_parameter_lists work as a predicate here?

Jason

Reply via email to