Using __traits(getMember...) in alias statement

Tobias Pankrath tobias at pankrath.net
Thu Nov 17 09:44:12 PST 2011


> This helps a lot with the current state of affairs:
> 
> template ID(alias x){alias x ID;}
> 
> It will even allow funny things like this:
> 
> alias ID!((a,b){return a+b;}) add;
> 
> static assert(add(1,2) == 3);

Nice to know, thanks!


More information about the Digitalmars-d-learn mailing list