On 1/24/13 3:57 AM, Jacob Carlborg wrote:void delegate () foo ();foo() // would call the delegate ?Yes. a = foo; // fetch the delegate b = foo(); // fetch and invoke the delegate
How about generic code?
void callFunc(alias f, Args...)(Args args)
{
f(args);
}
void delegate() foo();
void delegate(int) bar(int x);
callFunc!foo(); // calls delegate?
callFunc!bar(0); // calls bar?
Seems like a recipe for disaster.
