On Thursday, 19 June 2014 at 12:00:01 UTC, Tomer Filiba wrote:
That requires me having the names in scope, etc. I want to be able to use the function object, just like I could do if it weren't a method.-tomer
class C
{
void methodOfC(int x) { writeln(x); };
}
void main()
{
auto c = new C;
auto method = &(c.methodOfC);
method(12);
}
There are no method function pointer in D, but delegates work.
