The complement of true is true, except when it's false
28 points by aw1621107
28 points by aw1621107
Fantastic example of why integer promotion is a kinda horrible idea, as is treating bool types as integers in general.
Or at the very least, properly treating bool as a 1-bit integer even if it means sometimes generating a few more instructions to mask it down.
However you should not rely on this behaviour as gcc has a longstanding bug which gets this wrong (or right, if you prefer logic to C++).
I should really stop writing C++. I shook my head so many times through this post. Brilliant.