[Issue 8384] std.conv.to should allow conversion between any pair of string/wstring/dstring/char*/wchar*/dchar*

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 15 14:34:59 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8384


Adam D. Ruppe <destructionator at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |destructionator at gmail.com


--- Comment #18 from Adam D. Ruppe <destructionator at gmail.com> 2012-08-15 14:34:54 PDT ---
I think rejecting might be the best option because if you treat it as a string,
what if it doesn't have a 0 terminator? That could easily happen if you pass it
a pointer to a D string.

I don't think that is technically un- at safe, but it could be a problem anyway to
get an unexpected crash because of it. At least with to!string(char*) you might
think about it for a minute and avoid the problem.


So on one hand, I think it should just work, but on the other hand the compile
time error might be the most sane.

-- 
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