Generalizing over function pointers and delegates

Bastiaan Veelo Bastiaan at
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]$2u4h$

Interesting. Thanks for the link.

More information about the Digitalmars-d-learn mailing list