3 ms·
>> Other than this particular edge case it's not obvious to me why bitwise operators shouldn't be applicable to boolean values. That is a really good question.
by phkahler 5y ago
>> Other than this particular edge case it's not obvious to me why bitwise operators shouldn't be applicable to boolean values.
That is a really good question. At some point they decided that true=1 and false=0 but I'm not sure how deep that goes. In particular what does ! actually do in this context?
- gpderetta 5y agoIn what context? Unless overloaded ! coerces its operand to bool and returns the negation.