Andrei Alexandrescu wrote:
> Is there a plan to allow:
>
> typeof(true ? x1 : x2) max(T, U)(T x1, U x2)
> {
> return x1 > x2 ? x1 : x2;
> }
Is it impossibly hard or ambiguous to allow the compiler to infer the
return type here? Something like
> auto max(T, U)(T x1, U x2)
> {
> return x1 > x2 ? x1 : x2;
> }