by CamperBob2 · 9y ago · 0 comments
bool a = true;
bool b = true;
bool c = a + b;
This leaves c set to true. Basically it gets promoted to int, turned into a value of 2, and demoted back to bool.Either way it's highly nonstandard not to implement a bitwise-or operation on a boolean type. It's a violation of the "principle of least surprise" as well as a portability hazard. No upside that I can imagine.