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.

Reply via email to