This is the mail archive of the gcc-bugs@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]

C++: namespace resolution bug - retraction


Ok,
  Sorry for wasting your time.  I think I get it now.
In the previous example, operator+(char const*, Base const&)
was chosen (correctly) by overload resolution because
Derived->Base is a better match than a user conversion.

  The error in the line
    Der d1 = " hi " + Der( " world " );
about "conversion from `Base' to non-scalar type `Der'" is
due to the operator+ returning a Base.  It is complaining
that it can't construct the Der d1 from a Base (return from +).
Is this correct?

-Kenny

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