2014-06-11 Andrew Sutton <andrew.n.sutton@gmail.com>
commit521f545d0f3fd9d0fdf8a9686f8e4331ed8d67eb
authorasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Jun 2014 17:09:32 +0000 (11 17:09 +0000)
committerasutton <asutton@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Jun 2014 17:09:32 +0000 (11 17:09 +0000)
tree8f9e6767863a4e23bd780421e493d9aaf5b5040d
parent597ac53ce888e32d2c38d2102e1386871c8117a8
2014-06-11  Andrew Sutton  <andrew.n.sutton@gmail.com>
* gcc/cp/cp-tree.h (build_constrained_parameter): Renamed fro
describe_tempalte_parm.
* gcc/cp/parser.c (cp_check_constrained_type_parm): New. Prevent
declaration of cv-qualifed or non-id types.
(cp_constrained_type_template_parm): Renamed, check for invalid
specifiers.
(cp_constrained_template_template_parm): Renamed, check for invalid
specifiers.
(cp_constrained_non_type_tmeplate_parm): Renamed.
(cp_finish_constrained-parameter): Support checking of decarlarations.
(cp_check_concept_name): Renamed. Add initial support for auto
and constrained-type-specifiers in compound requirements.
(cp_parser_nonclass_name): Only check for concept names if -fconcepts
is on.
(cp_manage_requirements): New RAII guard for managinging the
current_template_reqs variable during declaration parsing.
(cp_paresr_trailing_requirements): Refactored common parsing
requirements from cp_parser_init_declarator and
cp_parser_member_declarator. Take terse constraints from implicit
parameter declarations.
(cp_parser_init_declarator): Cleanup, refactor requirement logic.
(cp_parser_type_id_1): Allow auto in compound requirements.
(cp_parser_member_declaration): Cleanup, refactor requirement logic.
(cp_parser_compound_requirement): Note parsing state for the
trailing-type-id so we can get auto and constrained-type-specifiers.
(cp_parser_function_definition_after_decl): Remove broken constraint
association.
* gcc/cp/parser.h (cp_parser): New member.
* gcc/cp/constraint.cc (finish_validtype_expr): Initial (non-)handling
of auto in type requirements.
(finish_concept_name): Moved to cp_check_concept_name.
* gcc/testuite/g++.dg/concepts/constrained-parm.C: New test.
* gcc/testuite/g++.dg/concepts/generic-fn.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/c++-concepts@211476 138bc75d-0d04-0410-961f-82ee72b054a4
ChangeLog.concepts
gcc/cp/constraint.cc
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/parser.h
gcc/testsuite/g++.dg/concepts/constrained-parm.C [new file with mode: 0644]
gcc/testsuite/g++.dg/concepts/generic-fn.C [new file with mode: 0644]