2015-05-07 Andrew Sutton <andrew.n.sutton@gmail.com>
commitaef558d025bd2423f7817f3690e20fc5f1a83197
authorasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 May 2015 20:25:15 +0000 (7 20:25 +0000)
committerasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 May 2015 20:25:15 +0000 (7 20:25 +0000)
tree88a1bc242144406c37cf2cbb607a8a41739b3e6e
parentb7c81780a661db556a83977b6d14940b72cc68de
2015-05-07  Andrew Sutton  <andrew.n.sutton@gmail.com>

Implement argument deduction constraints.
* gcc/cp/cp-tree.def (DEDUCT_CONSTR): Add a third operand.
* gcc/cp/cp-tree.h (auto_deduction_context): New. Flags to control
diagnostics in auto deduction.
(do_auto_deduction): New overload to allow for control of diagnostics.
(tsubst_constraint): Make extern.
* gcc/cp/pt.c (tsubst): Propagate constraints for place holders.
(do_auto_deduction): New overload that calls the expanded version
with default args.
(do_auto_deduction): Control diagnostics with tf_subst_flags and
auto_deduction_context.
(do_auto_deduction): Only check constraints for when not using
decltype(auto).
* gcc/cp/constraint.cc (xform_compound_requirement): Build argument
deduction constraints.
(xform_atomic): Don't check the types of dependent expressions,
even when not processing templates.
(satisfy_argument_deduction_constraint): Implement this.
* gcc/testsuite/g++.dg/concepts/placeholder1.C: Add tests for
more complex failures.
* gcc/testsuite/g++.dg/concepts/placeholder2.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/c++-concepts@222891 138bc75d-0d04-0410-961f-82ee72b054a4
ChangeLog.concepts
gcc/cp/constraint.cc
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/concepts/placeholder1.C
gcc/testsuite/g++.dg/concepts/placeholder2.C [new file with mode: 0644]