News for hackers. Stuff that matters.
Re:Mistakes with Rust smart pointers: when Deref goes wrong by quietbritishjim on Monday July 10, 2023 @05:39AM (#36663988)
If you start with

    void foo(std::string x, int y);
    void foo(const char* x);
Then calls too 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.

There are no comments on this comment yet.