Name

operator^ function template — Performs bitwise exclusive or of two bitsets

Synopsis

template <size_t N>
  bitset<N> operator^(const bitset<N>& a, const bitset<N>& b);

The ^ operator takes two bitsets and returns a new bitset that represents the bitwise exclusive or of the operands. In other words, an output bit is set when the corresponding bits are not equal in either operand, and an output bit is reset if the corresponding bits in both operands are identical.