This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Problem with overloaded function selection
- From: "Rupert Wood" <me at rupey dot net>
- To: <bjensen at fastmail dot fm>,"'Andrey Pozdeev'" <AndreyPozdeev at rambler dot ru>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 12 Aug 2002 15:06:14 +0100
- Subject: 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.