c++/10380: warning about "choosing ... over ..." when there is no choice
nathan@gcc.gnu.org
nathan@gcc.gnu.org
Sun Apr 20 13:39:00 GMT 2003
Synopsis: warning about "choosing ... over ..." when there is no choice
State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Sun Apr 20 13:39:39 2003
State-Changed-Why:
not a bug. a = c, is equivalent to a.operator= (c)
The candidate function is A::operator=(A const &)
There are two user-defined conversion sequences to convert
'c' to 'A const &', these are
1) const qualify C, apply C::operator A () const
2) apply C::operator B (), convert to A const &
these are indistinguishable conversion sequences, and
therefore the call is ill-formed. G++ is not so picky about
things, and finds a conversion that works, but might not be the one you expected.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10380
More information about the Gcc-prs
mailing list