aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-01-10 14:57:51 -0500
committerPatrick Palka <ppalka@redhat.com>2022-01-10 14:57:51 -0500
commit3e95a974c39e922d19bf7ac1246730c516ae01f2 (patch)
tree75400c8b65eb2929942f7d74ece3bfdefb860314 /gcc/ada/sem_ch3.adb
parent54fa7daefe35cacf4a933947d1802318da193c01 (diff)
downloadgcc-3e95a974c39e922d19bf7ac1246730c516ae01f2.zip
gcc-3e95a974c39e922d19bf7ac1246730c516ae01f2.tar.gz
gcc-3e95a974c39e922d19bf7ac1246730c516ae01f2.tar.bz2
c++: "more constrained" vs staticness of memfn [PR103783]
Here we're rejecting the calls to g1 and g2 as ambiguous even though one overload is more constrained than the other (and they're otherwise tied), because the implicit 'this' parameter of the non-static overload causes cand_parms_match to think the function parameter lists aren't equivalent. This patch fixes this by making cand_parms_match skip over 'this' appropriately. Note that this bug only affects partial ordering of non-template member functions because for member function templates more_specialized_fn seems to already skip over 'this' appropriately. PR c++/103783 gcc/cp/ChangeLog: * call.c (cand_parms_match): Skip over 'this' when given one static and one non-static member function. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-memfun2.C: New test.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
0 files changed, 0 insertions, 0 deletions