https://issues.dlang.org/show_bug.cgi?id=14802

--- Comment #5 from Ivan Timokhin <[email protected]> ---
(In reply to Steven Schveighoffer from comment #4)
> ...
> 
> However, for double/float:
> 
> f!double(1.0, 1.0f) and f!float(1.0, 1.0f) both compile.
> 
> Decision is necessarily arbitrary because both can compile. To make the
> decision "consistent" is not necessarily a bug fix, I can see how the
> compiler is free to arbitrarily decide which type to use.
> 
> ...

Or it can reject the call as ambiguous (or prefer double as it does in other
cases). As a matter of fact, that's what it does if f(float, float) and
f(double, double) are defined explicitly, instead of being generated by
template instantiation.

--

Reply via email to