From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29438 invoked by alias); 12 Aug 2002 10:18:38 -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 29426 invoked from network); 12 Aug 2002 10:18:28 -0000 Received: from unknown (HELO mx0.rambler.ru) (81.19.66.47) by sources.redhat.com with SMTP; 12 Aug 2002 10:18:28 -0000 Received: from mail3.rambler.ru (mail3.rambler.ru [217.73.192.31]) by mx0.rambler.ru (Postfix) with SMTP id 2F79D47A51B for ; Mon, 12 Aug 2002 14:21:04 +0400 (MSD) (envelope-from AndreyPozdeev@rambler.ru) Received: from 217.73.192.34 by rambler.ru with SMTP id AA24325 for gcc-help@gcc.gnu.org; Mon, 12 Aug 2002 14:15:39 +0400 (MSD) From: Andrey Pozdeev To: gcc-help@gcc.gnu.org Cc: Subject: Problem with overloaded function selection Message-Id: <3D578A3C.AA20189@mb1.rambler.ru> Content-Type: text/plain; charset=koi8-r MIME-Version: 1.0 Date: Mon, 12 Aug 2002 03:18:00 -0000 X-SW-Source: 2002-08/txt/msg00084.txt.bz2 I tried to compile the following example using GCC and MS Visual C++: ----------- class A { public: A(){}; }; class B { public: operator double() {return 0L;}; operator int() { return 0; }; operator A() { return A();}; }; void test(char){}; void test(A){}; int main() { B b; test(b); return 0; } ------------- Both compilers compiles this example succesfully. But if we comment line with 'operator double' or with 'operator int' then GCC will complain, Visual C++ will not. What's the matter ? Andrey. ---- http://www.rambler.ru