Passing this to void *
Adam D. Ruppe
destructionator at gmail.com
Wed Nov 22 15:36:22 UTC 2017
On Wednesday, 22 November 2017 at 15:31:36 UTC, Tim Hsu wrote:
> It seems in D, reference has its own address, am I right?
> unlike c++
The local variable does have its own address. Do not take its
address - avoid &this or &object.
Just cast the ref itself.
In D, a class this or Object variable is already like a C++ Foo*.
If you & that, you get a Foo** - not what you want in most cases.
More information about the Digitalmars-d-learn
mailing list