Generalizing over function pointers and delegates
Bastiaan Veelo
Bastiaan at Veelo.net
Fri Feb 15 17:16:36 UTC 2019
On Friday, 15 February 2019 at 16:40:39 UTC, ag0aep6g wrote:
> Your fun_to_dlg fails when the function has parameters.
Hah ok. std.functional.toDelegate() does work in its place though.
> As far as I see, it would be possible make the conversion would
> work by changing how a delegate's context is passed [1]. But I
> didn't pursue that idea further, and no one else picked it up
> either.
>
> [1] https://forum.dlang.org/post/ofc0lj$2u4h$1@digitalmars.com
Interesting. Thanks for the link.
More information about the Digitalmars-d-learn
mailing list