version and extern problems

Walter Bright newshound1 at digitalmars.com
Sun Jul 8 11:44:17 PDT 2007


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).



More information about the Digitalmars-d mailing list