Neater enum + version

Vladimirs Nordholm v at vladde.net
Sun Nov 18 17:47:07 UTC 2018


Currently I have something like

     version (Posix)
     {
         enum foo = "bar";
     }
     else
     {
         enum foo = "baz";
     }

Is there anyway to make it "neater"? Maybe something in one line:

     enum foo = version (Posix) { "posix" } : { "other" } ;


More information about the Digitalmars-d-learn mailing list