unsigned policy (implicit conversions for complex?)

Walter Bright newshound at digitalmars.com
Mon Feb 12 14:26:04 PST 2007


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.



More information about the Digitalmars-d mailing list