version(StdDoc)

Stanislav Blinov stanislav.blinov at gmail.com
Sun Nov 25 07:22:54 UTC 2018


On Sunday, 25 November 2018 at 07:19:50 UTC, Stanislav Blinov 
wrote:

> Granted, it may require some special syntax, i.e.
>
> enum E {
>     a,
>     b if version(Windows),
>     c if version(Windows),
>     d if version(Posix),
> }
>
> or something to that effect.

Come to think of it, since UDAs are now allowed, the compiler 
could potentially be taught this:

enum E {
     a,
     @version(Windows) b,
     @version(Windows) c,
     @version(Posix)   d,
}


More information about the Digitalmars-d-learn mailing list