From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1159 invoked by alias); 12 Aug 2002 14:07:00 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 1151 invoked from network); 12 Aug 2002 14:06:59 -0000 Received: from unknown (HELO anchor-post-31.mail.demon.net) (194.217.242.89) by sources.redhat.com with SMTP; 12 Aug 2002 14:06:59 -0000 Received: from mailgate.softwire.co.uk ([62.49.203.138] helo=polarbear) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 17eFqU-000HAV-0V; Mon, 12 Aug 2002 15:06:58 +0100 From: "Rupert Wood" To: , "'Andrey Pozdeev'" Cc: Subject: RE: Problem with overloaded function selection Date: Mon, 12 Aug 2002 07:07:00 -0000 Message-ID: <616BE6A276E3714788D2AC35C40CD18D5EC576@whale.softwire.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <616BE6A276E3714788D2AC35C40CD18D780D92@whale.softwire.co.uk> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-08/txt/msg00089.txt.bz2 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.