Replacing std.math raw pointer arithmetic with a union type

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed May 17 08:15:04 PDT 2017


On 5/16/2017 8:02 PM, tsbockman wrote:
> Such code is verbose, hard to read, and, judging by the bugs and missing
> specializations I've found, hard to write correctly. It is also not compatible
> with CTFE.

CTFE does support things like:

     double d;
     int i = *(cast(int*)&d);

as a special case, specifically to support bit manipulation of floating point types.



More information about the Digitalmars-d mailing list