[Issue 5016] to!() can not convert from wide characters to char
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 9 15:21:54 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5016
--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-01-09 15:20:07 PST ---
std.conv.to!() does need to be fixed to better handle the situation though. It
should probably either outright refuse to convert between each of the character
types on the theory that there's pretty much no way that that's a good idea and
that the programmer can just use cast if they really, actually need to do such
a conversion. Or it should throw when the character can't fit in a single code
unit of the target type, though that's going to result in code that is rather
hit or miss as to whether it's going to succeed or not and wouldn't likely be a
good idea to use in code generally.
--
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