operator==,!=(std::bitset) (3) - Linux Manuals
operator==,!=(std::bitset): operator==,!=(std::bitset)
NAME
operator==,!=(std::bitset) - operator==,!=(std::bitset)
Synopsis
bool operator==( const bitset<N>& rhs ) const; (1)
bool operator!=( const bitset<N>& rhs ) const; (2)
1) Returns true if all of the bits in *this and rhs are equal.
2) Returns true if any of the bits in *this and rhs are not equal.
Parameters
rhs - bitset to compare
Return value
1) true if the value of each bit in *this equals the value of the corresponding bit in rhs, otherwise false
2) true if !(*this == rhs), otherwise false
Example
Compare two bitsets to determine if they are identical:
// Run this code
Output: