[c++concepts] Reducing requirements
Andrew Sutton
andrew.n.sutton@gmail.com
Wed Mar 27 15:19:00 GMT 2013
Implements reduction of requirements into the constraints language:
logical formulas comprised of atomic propositions. Calls to constraint
predicates are recursively inlined in the resulting expression. All
other calls are treated as atoms.
2013-03-01 Andrew Sutton <andrew.n.sutton@gmail.com>
* gcc/cp/Makefile.lang.in: Add constraints.o target.
* gcc/cp/cp-tree.h (substitute_template_parameters): Declare.
(instantiate_requirements): Declare.
(conjoin_requirements): Declare.
(disjoin_requirements): Declare.
(reduce_requirements): Declare.
* gcc/cp/pt.c (substitute_template_parameters): Define.
(instantiate_requirements): Define.
* gcc/cp/pt.c (finish_template_requirements): Call
reduce_requirements to get constraints.
* gcc/cp/parser.c (cp_parser_type_parameter): Restore saved
constraints after parsing template template parameter decl.
* gcc/cp/constraints.cc: New.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reduce-req.patch
Type: application/octet-stream
Size: 17193 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130327/3eaa8011/attachment.obj>
More information about the Gcc-patches
mailing list