On Thursday, 5 March 2015 at 19:51:09 UTC, Max Klyga wrote:
If you really need the actual pointer to object data you can use `*cast(void**)&myObject`. Compiler cannot cast object reference to `void*` but we can trick it ;)

It can, actually. A class can define its own cast(void*) though, so the reinterpret way may be more robust. Also, I'm not sure if any of this is specified. So watch out for undefined (or underspecified) behaviour.

Reply via email to