This is the mail archive of the
mailing list for the GCC project.
Re: [c++-concepts] requires expressions
- From: Jason Merrill <jason at redhat dot com>
- To: Andrew Sutton <andrew dot n dot sutton at gmail dot com>, gcc-patches at gcc dot gnu dot org, Gabriel Dos Reis <gdr at axiomatics dot org>
- Date: Fri, 12 Jul 2013 12:21:30 -0700
- Subject: Re: [c++-concepts] requires expressions
- References: <CANq5SyuTAkpLtqdcCAjFko_L5JwMm+4imOj+cdxEgbs5pRvY8A at mail dot gmail dot com>
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))
+ tree subst = instantiate_requirements (t, args);
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.
+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 constraint.cc 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