boost::dynamic_bitset::dynamic_bitset
Constructs a bitset of num_bits zero bits, which uses a copy of alloc to allocate memory.
Synopsis
Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>
explicit
dynamic_bitset(
size_type num_bits,
allocator_type const& alloc);
Description
This is the same as dynamic_bitset( num_bits, 0ul, alloc ), but it allows uses‐allocator construction from a size: for instance, emplace_back( n ) on a std::pmr container of bitsets which use a std::pmr::polymorphic_allocator.
Throws
An allocation error if memory is exhausted (std::bad_alloc if allocator_type is a std::allocator).
Parameters
Name |
Description |
num_bits |
The size of the constructed bitset. |
alloc |
The allocator to use. |
Postconditions
-
this‐>size() == num_bitsandthis‐>none().
Created with MrDocs