← Back to index
|
Original Bugzilla link
Bug 20412 – std.range.put misbehaves when OutputRange.put(void[] exists)
Status
NEW
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-11-21T14:45:32Z
Last change time
2024-12-01T16:36:04Z
Assigned to
No Owner
Creator
Eyal
Moved to GitHub: phobos#10400 →
Comments
Comment #0
by eyal — 2019-11-21T14:45:32Z
Here's a reproduction of the bug: struct OutputRange { void put(const(void)[] bytes) { import std.stdio; writeln(bytes); } } unittest { import std.range: put; OutputRange rng; put(rng, "Hello"); // Writes [72, 101, 108, 108, 111] as expected import std.algorithm: map; put(rng, "Hello".map!((dchar a)=>a)); // Writes the bytes internally representing the MapResult: [5, 0, 0, 0, 0, 0, 0, 0, 82, 175, 72, 34, 59, 86, 0, 0] }
Comment #1
by robert.schadek — 2024-12-01T16:36:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/phobos/issues/10400
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB