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" } ;