This is true.
> It works for booleans due to their bit pattern, but it's not the same.
This makes less sense. A bool in c++ is just an integer value with few inputs. It is, as far as I can tell, the exact same.
> Java's |= is different for ints and boolean.
Java has bool and int as different types. There were versions of C++ compilers that just straight out had bool as a typedef of int.
This is true.
> It works for booleans due to their bit pattern, but it's not the same.
This makes less sense. A bool in c++ is just an integer value with few inputs. It is, as far as I can tell, the exact same.
> Java's |= is different for ints and boolean.
Java has bool and int as different types. There were versions of C++ compilers that just straight out had bool as a typedef of int.