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

          Issue ID: 19077
           Summary: DirIterator cannot be used as range
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nob...@puremagic.com
          Reporter: cont...@szabobogdan.com

`std.file.dirEntries` should return an input range, but this code does not
compile:

auto range = dirEntries("files/", SpanMode.depth)
        .map(a => a);


Error: template std.algorithm.iteration.map cannot deduce function from
argument types !()(DirIterator, void), candidates are:
/usr/include/dmd/phobos/std/algorithm/iteration.d(457,1):       
std.algorithm.iteration.map(fun...) if (fun.length >= 1)

--

Reply via email to