Bug 3303 – std.conv: range-to-integer conversion is broken.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2009-09-07T04:17:00Z
Last change time
2015-06-09T01:26:48Z
Keywords
patch
Assigned to
andrei
Creator
k.hanazuki

Attachments

IDFilenameSummaryContent-TypeSize
446conv.d.patchpatchtext/plain944

Comments

Comment #0 by k.hanazuki — 2009-09-07T04:17:56Z
Created attachment 446 patch std.conv.parse!int only works with char ranges but not wchar nor dchar, and should advance the given range. ---------- import std.conv, std.range; void main() { auto r = take(6, "123 45"d); assert(parse!int(r) == 123); assert(r.front == ' '); }
Comment #1 by dsimcha — 2010-08-15T08:34:25Z
This bug seems to have been fixed some time ago, as I can no longer reproduce it on 2.048.