C++: namespace resolution bug - retraction
Simpson, Kenny
Kenny.Simpson@gs.com
Mon Jan 22 17:53:00 GMT 2001
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
More information about the Gcc-bugs
mailing list