[Issue 16145] New: enumerate can't work with ref foreach

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jun 9 02:31:09 PDT 2016


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

          Issue ID: 16145
           Summary: enumerate can't work with ref foreach
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: john.loughran.colvin at gmail.com

enumerate works by returning a tuple of index and element, so e.g.

foreach(i, ref el; r.enumerate) el = 3;

compiles fine but will not do anything to el.

--


More information about the Digitalmars-d-bugs mailing list