strong enums: why implicit conversion to basetype?

Don Clugston dac at nospam.com
Fri Jan 27 07:35:53 PST 2012


On 26/01/12 21:26, Trass3r wrote:
>>> Is there any merit in having implicit conversion to the basetype?
>>
>> Allowing it to be used as an argument when calling C functions?
>
> extern(C):
> enum Bla : int {...}
> void foo(Bla b);
>
> How does this require implicit conversion?
> The codegen treats Bla like basetype anyway.

Some of the Windows functions are made of multiple enums of different 
types, ORed together.




More information about the Digitalmars-d mailing list