This is the mail archive of the 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: [c++-concepts] requires expressions

On 07/11/2013 02:59 PM, Andrew Sutton wrote:
 pp_cxx_requirement_parameter_list (cxx_pretty_printer *pp, tree t)

This should be merged with pp_cxx_parameter_declaration_clause.

+reqparms_to_string (tree p)

And this should have a more generic name.

+  // requries clause.


+  if (check_requirements (t, args))
+    return;
+  ++processing_template_decl;
+  tree subst = instantiate_requirements (t, args);
+  --processing_template_decl;

Surely you need to instantiate before checking, here and elsewhere.

+  inform (loc, "    %qE is not valid syntax", TREE_OPERAND (t, 0));

I don't think I would mention "syntax" here, since a syntax error would have been diagnosed at parse time rather than constraint checking time.

+// In an unevaluated context, the substitution of parm decls are not
+// properly chained during substitution. Do that here.
+static tree
+fix_local_parms (tree sparms)

A lot of the new code in pt.c doesn't seem like it needs to be there; let's put as much in as we can. Let's move some of the bits out of semantics.c as well.

Incidentally, I notice a funny thing about the headers of the new files:

/* Process declarations and variables for C++ compiler.
// Components for processing constraints and evaluating constraints.

The second line should move to the top of the file, replacing the first line.


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