aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-10-11 14:52:43 -0400
committerJason Merrill <jason@redhat.com>2024-10-14 15:29:26 -0400
commitcacbb4daac3e9a9d86992fef1a7c607b4cee5f22 (patch)
tree94bb6b2c34bdf6f8102acf2519a1d8e8d031a8da /libcpp
parentde0320712d026a2d1eeb57aef277fa5a91808ac2 (diff)
downloadgcc-cacbb4daac3e9a9d86992fef1a7c607b4cee5f22.zip
gcc-cacbb4daac3e9a9d86992fef1a7c607b4cee5f22.tar.gz
gcc-cacbb4daac3e9a9d86992fef1a7c607b4cee5f22.tar.bz2
c++: address deduction and concepts [CWG2918]
CWG2918 changes deduction from an overload set for the case where multiple candidates succeed and have the same type; previously this made the overload set a non-deduced context, now it succeeds since the result is consistent between the candidates. This is needed for cases of overloading based on requirements, where we want to choose the most constrained overload. I also needed to adjust resolve_address_of_overloaded_function accordingly; we already handled the comparison for template candidates in most_specialized_instantiation, but need to also do the comparison for non-template candidates such as member functions of a class template. CWG 2918 (proposed) gcc/cp/ChangeLog: * cp-tree.h (most_constrained_function): Declare.. * class.cc (resolve_address_of_overloaded_function): Call it. * pt.cc (get_template_for_ordering): Handle list from resolve_address_of_overloaded_function. (most_constrained_function): No longer static. (resolve_overloaded_unification): Always compare type rather than decl. gcc/testsuite/ChangeLog: * g++.dg/DRs/dr2918.C: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions