]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: compound-requirement partial substitution [PR113966]
authorPatrick Palka <ppalka@redhat.com>
Mon, 19 Feb 2024 16:34:45 +0000 (11:34 -0500)
committerPatrick Palka <ppalka@redhat.com>
Mon, 19 Feb 2024 16:34:45 +0000 (11:34 -0500)
commit3a6f3354eaaf38b5e6be41e4ebf521d299593a6e
tree3a6cb02e6196e65eae901810a11e6e8104ec18bf
parentb29f20b6e271b7cd1faad1ced9a55d92d00fcbfe
c++: compound-requirement partial substitution [PR113966]

When partially substituting a requires-expr, we don't want to perform
any additional checks beyond the substitution itself so as to minimize
checking requirements out of order.  So don't check the return-type-req
of a compound-requirement during partial substitution.  And don't check
the noexcept condition either since we can't do that on templated trees.

PR c++/113966

gcc/cp/ChangeLog:

* constraint.cc (tsubst_compound_requirement): Don't check
the noexcept condition or the return-type-requirement when
partially substituting.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/concepts-friend17.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/constraint.cc
gcc/testsuite/g++.dg/cpp2a/concepts-friend17.C [new file with mode: 0644]