On Friday, 19 February 2016 at 05:41:01 UTC, jmh530 wrote:
void main() { import std.stdio : writeln;auto foo_bar = foo(&bar); writeln(qux(1, 2, foo_bar)); //compiler error writeln(qux(1, 2, &baz)); }
int bar(int x)
{
return x;
}
int baz(int x, int y)
{
return bar(x);
}
void main()
{
import std.stdio : writeln;
int function(int x, int y) foo_bar = &baz;
writeln(foo_bar(1, 2));
}
