[Issue 2370] New: Version statement enhancement: versioned identifiers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 22 19:18:27 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2370

           Summary: Version statement enhancement: versioned identifiers
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: snake.scaly at gmail.com


I propose version identifiers to have a numeric value and to add the following
version statement syntax:

VersionCondition:
  version ( Identifier, Integer )

This version condition is satisfied when the Identifier's value is equal or
greater than the Integer.  This way, the code in

version (D_Version, 2)
{
...
}

will be compiled only when the compiler version is 2 or greater.  The version
specification syntax can be

VersionSpecification:
  version = Identifier ( Integer ) ;


-- 



More information about the Digitalmars-d-bugs mailing list