Get address of object in constructor.
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 13 10:58:31 PDT 2016
On Sunday, 13 March 2016 at 16:16:55 UTC, MGW wrote:
> void* thisAddr = cast(void*) &this;
This doesn't really make sense anyway, this is a local variable,
you want to do cast(void*) this in a class if you need the
address (which btw, you shouldn't actually, the reference itself
ought to be enough)
More information about the Digitalmars-d-learn
mailing list