Why I get delegate when passing address of function?

Mike Parker aldacron at gmail.com
Sun Sep 11 09:29:23 UTC 2022


On Sunday, 11 September 2022 at 09:15:11 UTC, Mike Parker wrote:

> Pointers to non-static member functions always produce a 
> delegate. Otherwise, you wouldn't be able to access the class 
> instance's members.

Reference:

https://dlang.org/spec/function.html#closures


More information about the Digitalmars-d-learn mailing list