1 matches bool, 2 matches long

Walter Bright newshound2 at digitalmars.com
Fri Apr 26 01:03:17 PDT 2013


On 4/25/2013 11:16 PM, deadalnix wrote:
> This "feature" never has been useful to me.

It has been useful to me. So there!

> It has caused bug.

The bug is not providing an overload for int.

> Additionally, the behavior is inconsistent :
>
> int i = 1;
> foo(i); // Don't call the bool version.

It is not inconsistent - you forgot a foo(int) overload. '1' is an int. If you 
don't supply and int overload, it must implicitly convert, and those conversions 
are considered equivalent.



More information about the Digitalmars-d mailing list