version and extern problems

Sean Kelly sean at f4.ca
Mon Jul 9 07:36:54 PDT 2007


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