diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2019-11-06 19:21:44 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2019-11-06 19:21:44 -0500 |
commit | 81a34a6b68184436726489b81d44267c40f6fbe7 (patch) | |
tree | 515b593df7589864ce653e94ad2328ffcdd2b507 /gcc/c | |
parent | 67568e1ad4d5623ac2c238b10fddf0faaa1fa70c (diff) | |
download | gcc-81a34a6b68184436726489b81d44267c40f6fbe7.zip gcc-81a34a6b68184436726489b81d44267c40f6fbe7.tar.gz gcc-81a34a6b68184436726489b81d44267c40f6fbe7.tar.bz2 |
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.
From-SVN: r277900
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions