December 15, 2018 [Issue 19495] New: Lack of version conjunctions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19495 Issue ID: 19495 Summary: Lack of version conjunctions Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: andrew.pennebaker@gmail.com version() blocks often require combinations of version identifiers, including union, intersection, negation, else if, and else structures. However, D currently does not allow version expressions to be combined this way. When a programmer wants to write version(A) { ... } version(B) { ... } version(C || D) { ... } else { ... } D instead generates a compiler error, or unintended runtime behavior, or even different behavior based on the current host environment. I think it is reasonable to assume that programmers want to combine version identifiers much like if/else if/else structures, and we should offer this capability to our users. -- |
Copyright © 1999-2021 by the D Language Foundation