Deprecate implicit `int` to `bool` conversion for integer literals

Michael V. Franklin slavo5150 at yahoo.com
Sun Nov 12 13:49:51 UTC 2017


On Sunday, 12 November 2017 at 13:34:50 UTC, Dmitry Olshansky 
wrote:

> However, I’d hate to rewrite things like:
>
> if (a & (flag1 | flag2))
>
> to
>
> if ((a & (flag1 | flag2)) != 0)
>
> When the first is quite obvious.

I don't think the proposal to deprecate integer literal 
conversions to `bool` would affect that as there doesn't appear 
to be an integer literal in the code.

Mike


More information about the Digitalmars-d mailing list