std.algorithm.among
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 13 12:41:08 PDT 2014
On Sunday, 13 July 2014 at 19:06:29 UTC, Timon Gehr wrote:
> On 07/13/2014 08:51 PM, Meta wrote:
>>
>> That's weird, I always assumed this worked. Was it always the
>> case that
>> numeric types can't be implicitly casted to bool?
>
> Yes, unless their range fits into [0,2).
It seems that not even that is the case.
void main()
{
uint n = 0;
//Error
bool b = n;
}
More information about the Digitalmars-d-learn
mailing list