This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49329] Static method with std::string parameter gets messed up with non-static method with bool parameter
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 21:29:18 +0000
- Subject: [Bug c++/49329] Static method with std::string parameter gets messed up with non-static method with bool parameter
- Auto-submitted: auto-generated
- References: <bug-49329-4@http.gcc.gnu.org/bugzilla/>
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