[Issue 8061] New: std.algorithm.joiner breaks when used with InputRangeObject
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 7 15:35:51 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8061
Summary: std.algorithm.joiner breaks when used with
InputRangeObject
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: nyphbl8d at gmail.com
--- Comment #0 from William Moore <nyphbl8d at gmail.com> 2012-05-07 15:37:10 PDT ---
When joining InputRangeObject-wrapped values, joiner fails to iterate past the
first Range provided in the RangeofRanges.
Example:
import std.range:joiner,ElementType,InputRange,inputRangeObject;
import std.conv:to;
import std.stdio:writefln;
void main() {
auto r = joiner([inputRangeObject("ab"), inputRangeObject("cd")]);
writefln("%s", to!string(r));
}
When this is run, the only output is "ab", not "abcd" as expected.
It's entirely possible that it's std.conv.to that's causing the problem as
well. I haven't dug deep enough into Phobos to know for sure.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list