Passing this to void *

Adam D. Ruppe destructionator at gmail.com
Wed Nov 22 15:17:33 UTC 2017


On Wednesday, 22 November 2017 at 15:07:54 UTC, Stefan Koch wrote:
> &this will do.

Even if it were an lvalue, that would be the address of a local. 
You should basically NEVER do that with D classes.

Just `cast(void*) this` if you must pass it to such a function.


More information about the Digitalmars-d-learn mailing list