unsigned policy (implicit conversions for complex?)
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Mon Feb 12 15:17:14 PST 2007
Walter Bright wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Bill Baxter wrote:
>>> I notice the graph doesn't include complex types.
>>> Is there any reason why float shouldn't be automatically converted to
>>> cfloat?
>>
>> Sharp eyes :o). I was simply too lazy to include complex types.
>> Probably real-to-complex conversion should be allowed implicitly, too,
>> as long as the basic principle of preserving value is respected.
>
> Implicit conversions from floats to complex types was disallowed because
> it caused overloading problems with math functions.
>
> Separate functions for float and complex functions are desirable.
So the way things should be is: all meaning-preserving integral
promotions should be kept; then, all implicit integral->floating point
promotions should be severed; then, all implicit floating point->complex
should go.
Right?
Andrei
More information about the Digitalmars-d
mailing list