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).
Throws
An allocation error if memory is exhausted (std::bad_alloc if allocator_type is a std::allocator). If the number of blocks needed exceeds the max_size() of the underlying container, whatever that container throws in that case (std::length_error for a std::vector).
Parameters
Name |
Description |
num_bits |
The new size of the bitset. |
value |
The value to set any new bit to. |
Created with MrDocs