Alias Arguments & Expressions

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sun Jan 14 16:14:35 PST 2007


Xinok wrote:
> To accomplish what alias expressions could do, you would have to write all of this:
> template mul(V...){
> 	const typeof(V[0] * V[1]) mul = V[0] * V[1];
> }
> 
> Compared to:
> alias (a*b) mul(a, b);

That typeof(...) is redundant. Remove that and it should default to 
automatic type deduction, which would do exactly the same.



More information about the Digitalmars-d mailing list