Member function pointers

Jacob Carlborg doob at me.com
Mon Jun 10 09:26:38 PDT 2013


On 2013-06-10 17:40, David Nadlinger wrote:

> Let me try to summarize it in code:
>
> ---
> class A { void foo(); }
> auto memberFun = (&A.foo).funcptr;
>
> auto a = new A;
> memberFun(a);
> ---

Why is this better than a delegate?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list