r277900 - in /trunk/gcc: cp/ChangeLog cp/constr...
jason@gcc.gnu.org
jason@gcc.gnu.org
Thu Nov 7 00:21:00 GMT 2019
Author: jason
Date: Thu Nov 7 00:21:44 2019
New Revision: 277900
URL: https://gcc.gnu.org/viewcvs?rev=277900&root=gcc&view=rev
Log:
Use satisfaction with nested requirements.
gcc/cp/
2019-11-06 Andrew Sutton <asutton@lock3software.com>
* constraint.cc (build_parameter_mapping): Use
current_template_parms when the declaration is not available.
(norm_info::norm_info) Make explicit.
(normalize_constraint_expression): Factor into a separate overload
that takes arguments, and use that in the original function.
(tsubst_nested_requirement): Use satisfy_constraint instead of
trying to evaluate this as a constant expression.
(finish_nested_requirement): Keep the normalized constraint and the
original normalization arguments with the requirement.
(diagnose_nested_requirement): Use satisfy_constraint. Tentatively
implement more comprehensive diagnostics, but do not enable.
* parser.c (cp_parser_requires_expression): Relax requirement that
requires-expressions can live only inside templates.
* pt.c (any_template_parm_r): Look into type of PARM_DECL.
2019-11-06 Jason Merrill <jason@redhat.com>
* pt.c (use_pack_expansion_extra_args_p): Still do substitution if
all packs are simple pack expansions.
(add_extra_args): Check that the extra args aren't dependent.
gcc/testsuite/
* lib/prune.exp: Ignore "in requirements" in diagnostics.
* g++.dg/cpp2a/requires-18.C: New test.
* g++.dg/cpp2a/requires-19.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C
trunk/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constraint.cc
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/lib/prune.exp
More information about the Gcc-cvs
mailing list