[Issue 18580] std.conv.to!(ubyte[])(void[]) should work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 8 17:38:39 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18580

Jonathan M Davis <issues.dlang at jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang at jmdavisProg.co
                   |                            |m

--- Comment #1 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
Could you be more specific? What breaks? What's an example that doesn't compile
when it should?

No array of void is a range (especially not a static one). So, if to were to
support something like cast(ubyte[])voidArr, then it would need to special case
the handling of void[], though I don't know if it's a great idea for to to
support that sort of thing or not, since it's inherently unsafe, whereas to is
generally supposed to be trying to do safe conversions, and all that such a
conversion is going to do is cast.

--


More information about the Digitalmars-d-bugs mailing list