C header file: tagged enumerations

Jesse Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Apr 26 16:39:53 PDT 2016


On Tuesday, 26 April 2016 at 23:33:08 UTC, Stefan Koch wrote:
> On Tuesday, 26 April 2016 at 22:57:36 UTC, Jesse Phillips wrote:
>> Windows tends to have these in their header files, what is the 
>> best way to translate them to D?
>>
>> [...]
>
> eunm win32msi = mixin(_WIN32_MSI);
>
> static if (win32msi >= 500) .....

Sorry forgot to mention that static if doesn't allow adding 
partial declarations, always need to be complete. Or to quote the 
compiler:

"Error: basic type expected, not static"


More information about the Digitalmars-d-learn mailing list