]> git.ipfire.org Git - thirdparty/gcc.git/commit
Implement multiple 'auto' feature from Concepts TS.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 31 Oct 2015 16:20:05 +0000 (16:20 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 31 Oct 2015 16:20:05 +0000 (16:20 +0000)
commit433fc17c1863c9dbdf232263785d144f50a480ff
tree58ced5bf7feb8ee0c6ac2b1c7d216ad00966909d
parent2d8d33b73c804689ecbf0b116015aa280f330a7d
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
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.c
gcc/cp/cxx-pretty-print.h
gcc/cp/error.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/g++.dg/concepts/auto1.C [new file with mode: 0644]