Changeset 381

Show
Ignore:
Timestamp:
07/05/08 17:17:07 (5 months ago)
Author:
FeepingCreature
Message:
  • 'Nother range improvement\!
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/tools/base.d

    r380 r381  
    884884    return res; 
    885885  } 
    886   mixin switchMode!("_startIncl", "from", true) startIncl; 
    887   mixin switchMode!("_startIncl", "from", false) startExcl; 
    888   mixin switchMode!("_endExcl", "to", false) endIncl; 
    889   mixin switchMode!("_endExcl", "to", true) endExcl; 
     886  alias switchMode!("_startIncl", "from", true) startIncl; 
     887  alias switchMode!("_startIncl", "from", false) startExcl; 
     888  alias switchMode!("_endExcl", "to", false) endIncl; 
     889  alias switchMode!("_endExcl", "to", true) endExcl; 
    890890  size_t length() { return to-from; } 
    891891  T opIndex(size_t where) { return from+cast(T) where; } 
     
    10991099  mustEqual("BoolSetTestOr", 2 /or/ 3 == 3, true); 
    11001100  mustEqual("BoolSetTestAnd", AndSet(2, 3) == 3, false); 
     1101  mustEqual("RangeInclTest", 5 in Range[2..5].endIncl, true); 
    11011102} 
    11021103