D equivalent of C++ reinterpret cast?

bearophile bearophileHUGS at lycos.com
Mon Sep 20 14:53:35 PDT 2010


Ali Çehreli:
> I remember being a part of a discussion where D'is unions were told to 
> be exactly the same as C's. That means, results of using a union is only 
> specified when it's used through one its members. Writing to one member 
> and reading from another is unspecified. It is clear that endianness and 
> padding should complicate matters.

I have just written a post about this topic:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=117675

Bye and thank you,
bearophile


More information about the Digitalmars-d-learn mailing list