Neater "not version (...)" ?

Vladimirs Nordholm v at vladde.net
Wed Sep 16 17:53:31 UTC 2020


Hello.

I wonder if there is a better way to compile something if the 
current operating system is _not_ a specific platform.

For example, I only want some code to compile if the operating 
system is not Windows. Currently I do this:

     version (Windows)
     {
     }
     else
     {
         // ... my code
     }

Is there a neater version of this, like `!version (Windows) { /+ 
... my code +/ }` ?


More information about the Digitalmars-d-learn mailing list