We should not capture the type if the function return type is undeduced.
Wouldn't we be better to handle undeduced type here rather than in the loop?
Not sure if it practically matters, but given: auto f(); double f(int); f(0,0);
There are two overloads, one with double and one with an unknown type. They're both candidates for the function being called, and I'm not sure we have any reason to believe the first is more likely.
Two counterarguments I can think of:
And maybe there are others... these are probably OK justifications but subtle so I'd like to see a comment tothat effect.
thanks, I think the behavior you suggest is more reasonable -- in the given example, go-to-def will yield two candidates, it is wired to catch one of the return type (not the other).