[Feature Request]: Full member function support in BestOverloadFunctionMatch
#590
Labels
enhancement
New feature or request
BestOverloadFunctionMatch
#590
Description of new feature
I've found that
BestOverloadFunctionMatch
doesn't select any member function if one isconst
. It also doesn't support overloading based on&
or&&
.If the second
foo
is commented out, I can match the first member fn and call it no problem. But when both are present, neither matches.This also brings up the important point that
BestOverloadFunctionMatch
doesn't take into account the constness or the value category of the invoking object. So matchingconst
member fns or matching&
or&&
member fns cannot be done without specifying more information to overload resolution.I think we should be able to solve this by having the invoking object as the first argument and then resolve on that. Right now,
BestOverloadFunctionMatch
actually expects that it's not present. So, in my example above, the only argument would be oneint
.If instead we need to provide a
bar const&
andint
then we can match the overload on constness and value category of the invoking object.@Vipul-Cariappa for vis.
The text was updated successfully, but these errors were encountered: