On Sunday, 24 November 2013 at 14:24:09 UTC, ilya-stromberg wrote:
On Sunday, 24 November 2013 at 14:17:50 UTC, Dicebot wrote:
Not exactly. It is all about "if" condition. AFAIK, D defines that condition `if(X)` get re-written to `if(cast(bool)X)` before semantic pass. So it is kind of implicit explicit conversion :)

Not exactly.


Your say no, but you then confirm. Please reread Dicebot's post.

Code:

bool b = f;

DMD output:

Error: cannot implicitly convert expression (f) of type Foo to bool


But code:

bool b = !f;

compiles.

Reply via email to