boost::dynamic_bitset::operator[]

Returns a reference to the bit at position pos.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

reference
operator[](size_type pos);

Return Value

A reference to bit pos. Note that reference is a proxy class with an assignment operator and a conversion to bool, which allows you to use operator[] for assignment. That is, you can write both x = b[ n ] and b[ n ] = x. However, in many other respects the proxy is not the same as the true reference type bool &.

Parameters

Name Description

pos

The right operand

Preconditions

  • pos < this‐>size().

Created with MrDocs