[Issue 15702] std.socket.Socket.receive breaks @safe

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 18 10:38:36 PST 2016


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

--- Comment #3 from hsteoh at quickfur.ath.cx ---
Yes, I agree. Converting T[] to void[] is @safe, but doing basically anything
with the void[] other than reading it must be @system. Which means
std.socket.Socket.receive should be @system, not @trusted. At least, it cannot
be @trusted unless it verifies via sig constraints that hasIndirections!T is
false.

Unfortunately changing this will probably break existing code, and it ain't
gonna be pretty.

--


More information about the Digitalmars-d-bugs mailing list