Convert a delegate to a function (i.e. make a thunk)

Daniel Murphy yebblies at nospamgmail.com
Thu Apr 26 09:52:15 PDT 2012


"Mehrdad" <wfunction at hotmail.com> wrote in message 
news:jn9ops$13bs$1 at digitalmars.com...
> It would be nice if there was a way to convert delegates to 
> functions/thunks, because certain annoying tasks (e.g. 'WndProc's in 
> Windows) would become a heck of a lot easier.
>
> Is there any way to already do this? If not, how about adding a 
> toFunction() method in std.functional?
>

Well, there's this: http://pastebin.com/XwEb2cpm

But it's pre-3797, and probably doesn't work anywhere except win32. 




More information about the Digitalmars-d mailing list