Jarrett Billingsley jarrett.billingsley at
Sun Oct 26 07:52:46 PDT 2008

On Sun, Oct 26, 2008 at 8:47 AM, Saaa <empty at> wrote:
>> you can solve that by casting x into real before the call
>> pow(cast(real)x,2U);
> Yes, but why is this necessary?
> Isn't there a preference to more matching arguments if all arguments could
> be implicitly converted?

No.  See the section on function overloading on this page:

So for pow(x, 2u), where x is a double, the match level for both
(real, uint) and (real, real) is "match with implicit conversions."
Therefore, it's an error.

More information about the Digitalmars-d-learn mailing list