summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 16:20:05 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 16:20:05 +0000
commit433fc17c1863c9dbdf232263785d144f50a480ff (patch)
tree58ced5bf7feb8ee0c6ac2b1c7d216ad00966909d /gcc/cp/error.c
parent2d8d33b73c804689ecbf0b116015aa280f330a7d (diff)
downloadgcc-433fc17c1863c9dbdf232263785d144f50a480ff.tar.gz
Implement multiple 'auto' feature from Concepts TS.
* parser.c (cp_parser_type_id_1): Allow 'auto' if -fconcepts. (cp_parser_template_type_arg): Likewise. (get_concept_from_constraint): Split out most logic to... * constraint.cc (placeholder_extract_concept_and_args): ...here. (equivalent_placeholder_constraints, hash_placeholder_constraint): New. * cxx-pretty-print.c (pp_cxx_constrained_type_spec): New. * cxx-pretty-print.h: Declare it. * error.c (dump_type) [TEMPLATE_TYPE_PARM]: Call it. * pt.c (is_auto_r, extract_autos_r, extract_autos, auto_hash): New. (type_uses_auto): Use is_auto_r. (do_auto_deduction): Handle multiple 'auto's if -fconcepts. * typeck.c (structural_comptypes) [TEMPLATE_TYPE_PARM]: Compare constraints. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229629 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index b0280d27ed0..75f6abb415f 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -494,7 +494,9 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
case TEMPLATE_TYPE_PARM:
pp_cxx_cv_qualifier_seq (pp, t);
- if (TYPE_IDENTIFIER (t))
+ if (tree c = PLACEHOLDER_TYPE_CONSTRAINTS (t))
+ pp_cxx_constrained_type_spec (pp, c);
+ else if (TYPE_IDENTIFIER (t))
pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (t));
else
pp_cxx_canonical_template_parameter