On 09/19/2011 08:59 AM, Timon Gehr wrote:
> 
> You could use the C preprocessor ;). Or this, that does the same thing:
> 
> version(V1) private enum _v1=true;
> else private enum _v1=false;
> mixin((_v1?"extern(System):":"extern(C):")~q{
>     // all declarations that should be affected.
> });

<code golf>

or this:

version(linux){
 extern(C):
  mixin(s);
}
version(Win32){
 extern(Windows):
 mixin(s);
}

enum s = q{
 <hundreds of opengl decls>
};

</code golf>

Reply via email to