[Issue 7328] Allow casting between ubyte[4] and int
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 20 11:38:53 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7328
--- Comment #2 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-01-20 11:38:53 PST ---
A good point. I don't know whether that's enough to make it a bad idea or not.
If you're worried about endianness though, the functions in std.bitmanip (e.g.
bigEndianToNative and nativeToBigEndian) already take care of it for you, since
they put non-native in static ubyte arrays of the appropriate type (the
conversion is dealt with internally in a union). So, maybe that in of itself
effectively solves the problem.
--
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