[Issue 7328] Allow casting between ubyte[4] and int
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 20 14:02:59 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7328
timon.gehr at gmx.ch changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timon.gehr at gmx.ch
--- Comment #4 from timon.gehr at gmx.ch 2012-01-20 14:02:56 PST ---
So is most of the language.
It needs to be in the language because it is already there, sort of:
import std.stdio;
struct S{int x;}
void main(){
writeln(cast(ubyte[4])S(28298298)); // ok
// writeln(cast(ubyte[4])28298298); // ng
}
I have always considered this an inconsistency. The implementation is a trivial
rewrite.
--
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