[Issue 13657] New: Bidirectional File.byLine range
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Oct 25 09:28:03 PDT 2014
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 at puremagic.com
Reporter: bearophile_hugs at 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.
--
More information about the Digitalmars-d-bugs
mailing list