boost::dynamic_bitset::resize

Changes the number of bits of the bitset to num_bits.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

void
resize(
    size_type num_bits,
    bool value = false);

Description

If num_bits >= size() then the bits in the range [0, size()) remain the same, and the bits in [size(), num_bits) are all set to value. If num_bits < size() then the bits in the range [0, num_bits) stay the same (and the remaining bits are discarded).

Parameters

Name Description

num_bits

The new size of the bitset.

value

The value to set any new bit to.

Created with MrDocs