3 ms·
Perhaps a case where after removing the unused parameter and updating all the call sites, none of the calls resolve to the original function anymore.
by foldr 3y ago
Perhaps a case where after removing the unused parameter and updating all the call sites, none of the calls resolve to the original function anymore.
- ninepoints 3y agoAnd we would expect this behavior why?
- quietbritishjim 3y agoIf you start with void foo(std::string x, int y); void foo(const char* x); Then calls to foo("bar", 0) would resolve to the first overload: the second isn't a match at all, but the first is a match with an implicit conversion from const char* to std::string. But if you removed the second parameter, including arguments at all call sites, then foo("bar") would match the second better because it doesn't involve any conversions, so it would be selected instead of the first.