|
bitset::flippublic member function
bitset<N>& flip ( ); bitset<N>& flip ( size_t pos ); Flip bits The version with no parameters flips all the bits in the bitset, i.e. changes all 0s for 1s and all 1s for 0s.The parameterized version, flips only the bit at position pos. The unary operator~ performs the same operation as flip(). Parameters
Return value*thisIf pos is not a valid bit position, out_of_range is thrown. Example
See also
|