[Issue 19495] New: Lack of version conjunctions
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Dec 15 21:50:04 UTC 2018
    
    
  
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 at puremagic.com
          Reporter: andrew.pennebaker at 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.
--
    
    
More information about the Digitalmars-d-bugs
mailing list