Bug 6160 – std.conv.to: Ignore _ to match the rest of D

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-06-15T04:55:00Z
Last change time
2011-09-22T02:40:42Z
Keywords
patch
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2011-06-15T04:55:53Z
writeln(1000_000_000e50L); // 1e59 writeln(to!real("1000_000_000_e50")); // std.conv.ConvException@std/conv.d(37): std.conv(758): Can't convert value `_000_000e50' of type const(char)[] to type real 'to' should be changed to ignore embedded "_", so that it is able to convert all valid D literals to their respective values.
Comment #1 by k.hara.pg — 2011-09-20T05:41:36Z