bitset<N>& operator&=(const bitset<N>& rhs) noexcept;
Effects: Clears each bit in *this for which the corresponding bit in rhs is clear, and leaves all other bits unchanged.
Returns: *this.
bitset<N>& operator|=(const bitset<N>& rhs) noexcept;
Effects: Sets each bit in *this for which the corresponding bit in rhs is set, and leaves all other bits unchanged.
Returns: *this.
bitset<N>& operator^=(const bitset<N>& rhs) noexcept;
Effects: Toggles each bit in *this for which the corresponding bit in rhs is set, and leaves all other bits unchanged.
Returns: *this.
bitset<N>& operator<<=(size_t pos) noexcept;
Returns: *this.
bitset<N>& operator>>=(size_t pos) noexcept;
Returns: *this.
Effects: Sets all bits in *this.
Returns: *this.
bitset<N>& set(size_t pos, bool val = true);
Requires: pos is valid
Effects: Stores a new value in the bit at position pos in *this. If val is nonzero, the stored value is one, otherwise it is zero.
Returns: *this.
Effects: Resets all bits in *this.
Returns: *this.
Requires: pos is valid
Effects: Resets the bit at position pos in *this.
Returns: *this.
bitset<N> operator~() const noexcept;
Effects: Constructs an object x of class bitset<N> and initializes it with *this.
Returns: x.flip().
Effects: Toggles all bits in *this.
Returns: *this.
Requires: pos is valid
Effects: Toggles the bit at position pos in *this.
Returns: *this.
unsigned long to_ulong() const;
Returns: x.
unsigned long long to_ullong() const;
Returns: x.
template <class charT = char,
class traits = char_traits<charT>,
class Allocator = allocator<charT> >
basic_string<charT, traits, Allocator>
to_string(charT zero = charT('0'), charT one = charT('1')) const;
Effects: Constructs a string object of the appropriate type and initializes it to a string of length N characters. Each character is determined by the value of its corresponding bit position in *this. Character position N - 1 corresponds to bit position zero. Subsequent decreasing character positions correspond to increasing bit positions. Bit value zero becomes the character zero, bit value one becomes the character one.
Returns: The created object.
size_t count() const noexcept;
Returns: A count of the number of bits set in *this.
constexpr size_t size() noexcept;
Returns: N.
bool operator==(const bitset<N>& rhs) const noexcept;
Returns: true if the value of each bit in *this equals the value of the corresponding bit in rhs.
bool operator!=(const bitset<N>& rhs) const noexcept;
Returns: true if !(*this == rhs).
Requires: pos is valid
Returns: true if the bit at position pos in *this has the value one.
Returns: count() == size()
Returns: count() != 0
Returns: count() == 0
bitset<N> operator<<(size_t pos) const noexcept;
Returns: bitset<N>(*this) <<= pos.
bitset<N> operator>>(size_t pos) const noexcept;
Returns: bitset<N>(*this) >>= pos.
constexpr bool operator[](size_t pos);
Requires: pos shall be valid.
Returns: true if the bit at position pos in *this has the value one, otherwise false.
Throws: Nothing.
bitset<N>::reference operator[](size_t pos);
Requires: pos shall be valid.
Returns: An object of type bitset<N>::reference such that (*this)[pos] == this->test(pos), and such that (*this)[pos] = val is equivalent to this->set(pos, val).
Throws: Nothing.
Remark: For the purpose of determining the presence of a data race ([intro.multithread]), any access or update through the resulting reference potentially accesses or modifies, respectively, the entire underlying bitset.