boost::to_block_range

Writes the bits of the bitset into the iterator result, a block at a time.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

template<
    typename Block,
    typename AllocatorOrContainer,
    typename BlockOutputIterator>
void
to_block_range(
    dynamic_bitset<Block, AllocatorOrContainer> const& b,
    BlockOutputIterator result);

Description

The first block written represents the bits in the position range [0, bits_per_block) in the bitset, the second block written the bits in the range [bits_per_block, 2 \* bits_per_block), and so on. For each block bval written, the bit ( bval >> i ) & 1 corresponds to the bit at position b \* bits_per_block + i in the bitset.

Parameters

Name Description

b

The bitset of which to copy the bits.

result

The start of the range to write to.

Preconditions

  • The type BlockOutputIterator must be a model of LegacyOutputIterator and its value_type must be the same type as Block. Furthermore, the size of the output range must be greater than or equal to b.num_blocks().

Created with MrDocs