diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-09-20 12:33:13 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-09-20 12:33:13 -0400 |
commit | ee3efe06c9c49c04eaa4e195a7ae8774a1b3faa2 (patch) | |
tree | 1cfecdc0e71817fa651608dc680379741001a11e /gcc/po | |
parent | 06557ba12b64c57368673c46a21b14cf4e6afb50 (diff) | |
download | gcc-ee3efe06c9c49c04eaa4e195a7ae8774a1b3faa2.zip gcc-ee3efe06c9c49c04eaa4e195a7ae8774a1b3faa2.tar.gz gcc-ee3efe06c9c49c04eaa4e195a7ae8774a1b3faa2.tar.bz2 |
c++: CWG 2789 and usings [PR116492]
After CWG 2789, the "more constrained" tiebreaker for non-template
functions should exclude member functions that are defined in
different classes. This patch implements this missing refinement.
In turn we can get rid of four-parameter version of object_parms_correspond
and call the main overload directly since now correspondence is only
only checked for members from the same class.
PR c++/116492
DR 2789
gcc/cp/ChangeLog:
* call.cc (object_parms_correspond): Remove.
(cand_parms_match): Return false for member functions that come
from different classes. Adjust call to object_parms_correspond.
(joust): Update comment for the non-template "more constrained"
case.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-memfun4.C: Also compile in C++20 mode.
Expect ambiguity when candidates come from different classes.
* g++.dg/cpp2a/concepts-inherit-ctor12.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/po')
0 files changed, 0 insertions, 0 deletions