Topic: Conversion sequences


Author: maxtal@physics.su.OZ.AU (John Max Skaller)
Date: Wed, 25 May 1994 14:15:20 GMT
Raw View
In article <JASON.94May23213025@deneb.cygnus.com> jason@cygnus.com (Jason Merrill) writes:
>Can anyone think of a reason why it would be useful for a compiler to
>consider more than one standard conversion in a row when looking for the
>best-matching sequence for a particular parameter?

 Ah. You mean why would it consider:

 float-->int-->long

which has two standard conversions "in a row"? Well, here's an example:

 Derived * --> Base const*

which I dont think is a Standard conversion but which can be considered
as the sequential composition of two Standard conversions. This suggests
the specifications are wrong. We should state "the composition of
any two standard conversions is a standard conversion". In that
case there would be no point having two in a row and the ambiguity
introduced above with

 Derived * --> Derived const * --> Base const *
 Derived * --> Base * --> Base const *

disappears.
--
        JOHN (MAX) SKALLER,         INTERNET:maxtal@suphys.physics.su.oz.au
 Maxtal Pty Ltd,      CSERVE:10236.1703
        6 MacKay St ASHFIELD,     Mem: SA IT/9/22,SC22/WG21
        NSW 2131, AUSTRALIA




Author: jason@cygnus.com (Jason Merrill)
Date: Tue, 24 May 1994 04:30:25 GMT
Raw View
Can anyone think of a reason why it would be useful for a compiler to
consider more than one standard conversion in a row when looking for the
best-matching sequence for a particular parameter?

Jason