Support non-type constrained-type-specifiers.
authorJason Merrill <jason@redhat.com>
Fri, 6 Nov 2015 16:21:29 +0000 (11:21 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 6 Nov 2015 16:21:29 +0000 (11:21 -0500)
commit636b25c1536d7b914750c2df9fce9d9fdeba69b5
tree89ef5af8fb6b67cce2a04c31f33cef0cc93af5af
parent567700fddd2cbc1d90bb8f2acae81b3210dba2fb
Support non-type constrained-type-specifiers.

* parser.c (check_type_concept): Remove.
(cp_parser_maybe_constrained_type_specifier): Don't call it.
(synthesize_implicit_template_parm): Handle non-type and template
template parameters.  Also compare extra args.  Return the decl.
(cp_parser_template_argument): Handle constrained-type-specifiers for
non-type template parameters.
(finish_constrained_template_template_parm): Split out from
cp_parser_constrained_template_template_parm.
(cp_parser_nonclass_name): Move some logic into
cp_parser_maybe_concept_name.
(cp_parser_init_declarator): Fix error recovery.
(get_concept_from_constraint): Remove.
(cp_parser_simple_type_specifier): Adjust for
synthesize_implicit_template_parm returning the decl.
* constraint.cc (placeholder_extract_concept_and_args)
(equivalent_placeholder_constraints): Also handle TYPE_DECL
constrained parms.

From-SVN: r229860
gcc/cp/ChangeLog
gcc/cp/constraint.cc
gcc/cp/parser.c
gcc/testsuite/g++.dg/concepts/generic-fn-err.C
gcc/testsuite/g++.dg/concepts/placeholder6.C [new file with mode: 0644]