[c++-concepts]: Diagnostics

Andrew Sutton andrew.n.sutton@gmail.com
Fri Jun 21 14:59:00 GMT 2013


Initial pass on diagnostics for constraints. The general approach is
to recurse through a requirement expression searching for constraints
that have failed, generating as precise a message as possible.

Admittedly, these will require some polishing (indentation, messages,
formatting, choosing a reasonable number of error messages). But I
think the general algorithm is essentially the right approach. I did
this differently in an early version, and it was much more cumbersome.

Changes are pushed in git branch asutton/c++-concepts. The Changelog is below:

2013-06-20  Andrew Sutton  <andrew.n.sutton@gmail.com>
  * gcc/cp/error.c (subst_to_string): Allow this to be called explicitly
  passing template parameters in the TREE_TYPE and with a null TREE_PURPOSE.
  * constraint.cc (check_requirements): New overload taking template
  arguments.
  (check_constraints.cc): Move instantiation and checking into the
  new check_requirements overload.
  (diagnose_requirements): New family of functions for diagnosing constraint
  failures.

Andrew



More information about the Gcc-patches mailing list