On Thursday, 11 October 2018 at 14:35:34 UTC, James Japherson wrote:
Took me about an hour to track this one down!

A + (B == 0) ? 0 : C;

D is evaluating it as

(A + (B == 0)) ? 0 : C;

That's why shouldn't compose it like that.
It's been a constant source of bugs in C/C++ code:
https://www.viva64.com/en/b/0583/#ID0E1CAC

Reply via email to