This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/10380: warning about "choosing ... over ..." when there is no choice


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]