version and extern problems
Mike Wey
no.spam at example.com
Mon Jul 9 10:45:39 PDT 2007
I guess that:
mixin("extern(C):");
typedef void function() foo;
is the same as:
extern(C){}
typedef void function() foo;
Sean Kelly wrote:
> Walter Bright wrote:
>> Mike Wey wrote:
>>> Should this work?
>>>
>>> version(Windows)
>>> { const char[] external = "extern(Windows):"; }
>>> else
>>> { const char[] external = "extern(C):"; }
>>>
>>> mixin(external);
>>> typedef void function() foo;
>>
>> No, it doesn't work (although it compiles).
>
> That seems like it should work. Is the problem something to do with the
> order in which things are evaluated at compile-time?
>
>
> Sean
More information about the Digitalmars-d
mailing list