This is the mail archive of the gcc-help@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: Problem with overloaded function selection


Bjorn Rhode Jensen wrote:

>  I guess, one will have to look in the specs to
> see, who is right in this matter. My gut feeling
> is, that it gcc is right. Conversions and function
> overloading seem pretty othogonal to me. Why should
> two conversions be worse than one conversion in matching
> an overloaded function??

I haven't had a chance to look at the standards either but I did play
with this a little: if you make test accept an A reference instead of an
A object:

    void test(A&) {}

then the GCC problem goes away. I guess the copy construction counts as
a second conversion.

Rup.


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