cast(size_t)&c != 0, but c is null

Dicebot m.strashun at gmail.com
Wed May 15 04:04:28 PDT 2013


On Wednesday, 15 May 2013 at 10:31:29 UTC, David wrote:
>> "&c" is address of reference, no class instance. I don't know 
>> if there
>> is a way to get a pointer to class instance in D but I am not 
>> aware of one.
>
> A simple cast to void* should do it: cast(void*)c

Is it actually defined somewhere in spec?


More information about the Digitalmars-d-learn mailing list