On 03/11/2014 08:03 AM, Paolo Carlini wrote:
+  if (DECL_INHERITED_CTOR_BASE (fun)
+      && TREE_CODE (fun) == TEMPLATE_DECL)
+    {
+      ret = false;
+      if (complain)
+       error ("inherited constructors inherit %<constexpr%> from "
+              "the designated base");
+    }

To correct my wording, the B constructor is the inheriting constructor, the inherited constructor is in A.

Let's look up the inherited constructor here and print it to be helpful. Probably the easiest way to find it will be to add a new entry point to locate_fn_flags so we call it with

(DECL_INHERITED_CTOR_BASE (fun), DECL_NAME (fun), FUNCTION_FIRST_USER_PARMTYPE (fun), LOOKUP_NORMAL|LOOKUP_SPECULATIVE, complain)

Then we can say "inherited constructor %qD is not constexpr".

Jason

Reply via email to