Language features and reinterpret casts
bearophile
bearophileHUGS at lycos.com
Tue Sep 21 04:16:40 PDT 2010
Don:
> It's going to be implementation defined behaviour (will depend on
> endianness) but not undefined behaviour.
> BTW std.math heavily relies on reinterpret casting float->int.
I suggest to add something like a std.traits.ReinterpretCast template to Phobos and use only it in Phobos modules and user code. This helps readability and will help future more aggressively optimizing D compilers too.
Bye,
bearophile
More information about the Digitalmars-d
mailing list