[Bug c++/49329] Static method with std::string parameter gets messed up with non-static method with bool parameter

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 8 21:29:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49329

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-08 21:29:03 UTC ---
(In reply to comment #0)
> I want a static and a non-static method with the same name

you might want to rethink that

cc::xx is a qualified name lookup, so can find both overloads of cc::xx

The implicit pointer-to-bool conversion is a better conversion sequence than
the user-defined conversion char*-to-std::string so it is selected, but calling
a member function without an an object is obviously ill-formed



More information about the Gcc-bugs mailing list