www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18837] New: MMFile should have opDollar

https://issues.dlang.org/show_bug.cgi?id=18837

          Issue ID: 18837
           Summary: MMFile should have opDollar
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: leprecorny protonmail.com

std.mmfile.MmFile does not contain opDollar, so when trying to access the
.length property, you get an error. E.g:

import std.stdio, std.mmfile;

void main() {
    MmFile shar = new MmFile(null, MmFile.Mode.readWrite, 10, null, 0);
    string output = shar[0 .. $];
}

Would error due to "undefined identifier __dollar"

--
May 06 2018