On Sunday, 28 April 2013 at 22:40:33 UTC, Andrei Alexandrescu
wrote:
On 4/28/13 5:41 PM, kenji hara wrote:
Yes, as Andrei mentioned, it is sometimes useful. But, at
least during
overload resolution, it must not occur.
Kenji Hara
Well the problem has other ramifications beyond bool. Consider:
import std.stdio;
int fun(short v1) { return 1; }
int fun(long v1) { return 2; }
void main(string[] args)
{
writeln(fun(10_000));
writeln(fun(100_000));
}
This prints "1 2". So the behavior of bool in this case is
consistent with the behavior of other integral types.
For the same reason, both should call the long overload.