On Monday, 18 July 2016 at 18:51:29 UTC, Jacob Carlborg wrote:
On 2016-07-18 20:49, Rufus Smith wrote:
Suppose I have the following: alias func = void function(int);
Is there a way to convert it automatically to something the
same type
except of delegate: alias del = toDel(func) = void
delegate(int);?
https://dlang.org/phobos/std_functional.html#toDelegate
No, that converts an actual function. I need to create a new
alias from the old one.
I'd also like to be able to create a delegate with a different
context pointer.