October 25, 2014 [Issue 13657] New: Bidirectional File.byLine range | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13657 Issue ID: 13657 Summary: Bidirectional File.byLine range Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nobody@puremagic.com Reporter: bearophile_hugs@eml.cc Currently this works as expected with dmd 2.067alpha: void main() { import std.stdio: writeln, File, stdin; import std.range: retro; import std.array: array; "test.d".File.byLine.array.retro.writeln; } But this: void main() { import std.stdio: writeln, File, stdin; import std.range: retro; "test.d".File.byLine.retro.writeln; } test.d(4,25): Error: template std.range.retro cannot deduce function from argument types !()(ByLine!(char, char)), candidates are: ...\dmd2\src\phobos\std\range.d(1966,6): std.range.retro(Range)(Range r) if (isBidirectionalRange!(Unqual!Range)) Perhaps File.byLine and File.byLineCopy can support reverse iteration of the lines of a file. -- |
Copyright © 1999-2021 by the D Language Foundation