On 2016-07-18 21:19, Rufus Smith wrote:
No, that converts an actual function. I need to create a new alias from the old one.
You mean the actual type? John's answer will give you that.
I'd also like to be able to create a delegate with a different context pointer.
You can explicitly set the context pointer using the "ptr" property: class Foo { void bar() {} } void delegate() dg; dg.ptr = cast(void*) new Foo; dg.funcptr = &Foo.bar; // not sure if this requires a cast -- /Jacob Carlborg