Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcso!hpfinote!pnl From: pnl@hpfinote.HP.COM (Peter Lim) Newsgroups: comp.lang.c++ Subject: Re: type conversions Message-ID: <15150003@hpfinote.HP.COM> Date: 27 Jun 90 22:52:41 GMT References: <1990Jun22.145713.17511@watserv1.waterloo.edu> Organization: Hewlett Packard CICD Lines: 33 > > According to the Annotated C++ Reference Manual, conversions that are > integral or from float to double are perferred over all others. Integral > conversions are from char or short to int, not from either of these to long. > These are 'standard conversions'. This book goes into excruciating detail > concerning these rules... > > - Daniel > > It does in AT&T cfront version 2.0. > > What compiler are you using? > I happen to reach this topic in Lippman's book in the last few days. Seems to say different thing to what ARM is quoted to be saying above. I don't have the book with me right now. But essentially, Lippman says, "When there is no exact match, standard conversion is applied to resolve the overloading and NO PREFERANCE IS GIVEN TO ANY TYPE OF CONVERSION." In such case, the given example should indeed produce ambiguous overload error ( ?? I'm still not used to proper C++ terms yet :-) ). So, is Lippman wrong ? Regards, ## Life is fast enough as it is ........ Peter Lim. ## .... DON'T PUSH IT !! >>>-------, ########################################### : E-mail: plim@hpsgwg.HP.COM Snail-mail: Hewlett Packard Singapore, : Tel: (065)-279-2289 (ICDS, ICS) | Telnet: 520-2289 1150 Depot Road, __\@/__ ... also at: pnl@hpfipnl.HP.COM Singapore 0410. SPLAT !