dmd 2.029 release

bearophile bearophileHUGS at lycos.com
Mon Apr 20 03:28:41 PDT 2009


tama:
> void foo(alias f)()
> {
>      writefln(f(3, 4));
> }
> foo!((x,y){ return x * y; })();
> 
> This code doesn't work(compile error).

To me the following works:

import std.stdio: writeln;
void foo(alias f)() {
     writeln(f(3, 4));
}
void main() {
    foo!((x,y){ return x * y; })();
}

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list