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,
}
              • Re: ver... Adam D. Ruppe via Digitalmars-d-learn
              • Re: ver... H. S. Teoh via Digitalmars-d-learn
              • Re: ver... Neia Neutuladh via Digitalmars-d-learn
              • Re: ver... Jonathan M Davis via Digitalmars-d-learn
              • Re: ver... Stanislav Blinov via Digitalmars-d-learn
              • Re: ver... Jonathan M Davis via Digitalmars-d-learn
              • Re: ver... Stanislav Blinov via Digitalmars-d-learn
              • Re: ver... H. S. Teoh via Digitalmars-d-learn
              • Re: ver... Jonathan M Davis via Digitalmars-d-learn
              • Re: ver... Stanislav Blinov via Digitalmars-d-learn
              • Re: ver... Stanislav Blinov via Digitalmars-d-learn
              • Re: ver... H. S. Teoh via Digitalmars-d-learn
              • Re: ver... Stanislav Blinov via Digitalmars-d-learn
              • Re: ver... H. S. Teoh via Digitalmars-d-learn
              • Re: ver... Adam D. Ruppe via Digitalmars-d-learn
  • Re: version(StdDoc) Jonathan M Davis via Digitalmars-d-learn

Reply via email to