Coreect way to create delegate for struct method.

Andrey saasecondbox at yandex.ru
Wed Aug 22 07:03:02 UTC 2018


On Tuesday, 21 August 2018 at 22:52:31 UTC, Alex wrote:
> Maybe, like this:

Thank you but here you use heap to create ab object. I want only 
on stack.
I know that one can do this:
> test_handler.ptr = null;
and in place of call this:
>handler.ptr = cast(void*)&this;
but it is ugly...

Hmm, any other ideas?


More information about the Digitalmars-d-learn mailing list