New Traits

Jacob Carlborg doob at me.com
Thu May 17 23:40:35 PDT 2012


On 2012-05-18 04:21, John Maschmeyer wrote:

> Also, passing lambdas via template alias parameters works. So something
> like this should work as well.
>
> void foo(alias dg)() {
> writeln(__traits(codeof, dg));
> }
>
> void main() {
> foo!(x=>x+1)();
> }

Very nice.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list