max() in phobos?

Jarrett Billingsley kb3ctd2 at yahoo.com
Tue Nov 14 06:45:27 PST 2006


"Reiner Pope" <reiner.pope at REMOVE.THIS.gmail.com> wrote in message 
news:ejbpi0$194t$1 at digitaldaemon.com...

> We could do all of this code, or we could just have type inference for 
> return values:
>
> auto max (T, U) (T t, U u)
> {
>   return t > u ? t : u;
> }
>
> Problem solved!

That's true.  D already does return type deduction for delegate literals.. 





More information about the Digitalmars-d-learn mailing list