Path: utzoo!attcan!uunet!mcvax!enea!kth!draken!Urd!newsuser From: newsuser@LTH.Se (Lund Institute of Technology news server) Newsgroups: comp.lang.c++ Subject: Type conversion and overloading Message-ID: <1988Jul22.134218.25895@LTH.Se> Date: 22 Jul 88 12:42:18 GMT Reply-To: dag@Control.LTH.Se (Dag Bruck) Organization: Dept. of Automatic Control, Lund Inst. of Technology, Sweden Lines: 33 Take the following program: overload f; extern void f(float y); overload g; extern void g(double y); main () { f(1); // error: bad argument list for overloaded f() f(2.0); g(1); g(2.0); } Section 8.9 of "The C++ Programming Language" clearly states that: Only the following conversions will be applied... int to double... so the error message is obviously intentional. My question is, why isn't the integer converted in this case? In the example above, there is no ambiguity. Is this (rare?) case not worth the increase in compiler complexity? Would it slow down the compiler too much? Has it been fixed in the much awaited release 2.0? Dag M Bruck-- Department of Automatic Control Internet: dag@control.lth.se Lund Institute of Technology UUCP: ...!enea!control.lth.se!dag P. O. Box 118 S-221 00 Lund, SWEDEN Phone: +46 46-108779