boost::dynamic_bitset::dynamic_bitset

Allocator‐extended move constructor.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

dynamic_bitset(
    dynamic_bitset&& src,
    allocator_type const& alloc) noexcept(/* see-below */);

Description

Constructs a bitset that is the same as the bitset src, and which uses a copy of alloc to allocate memory. If alloc == src.get_allocator(), the resources from src are used; otherwise, the blocks are copied into memory obtained from alloc. (That is what std::vector, the buffer used when AllocatorOrContainer is an allocator, does; if AllocatorOrContainer is a container, this constructor uses, and requires, the corresponding constructor of that container.) See also the allocator‐extended copy constructor.

Throws

Nothing, unless the corresponding constructor of buffer_type throws. For std::vector, that can only happen when the blocks are copied (see above): then, an allocation error is thrown if memory is exhausted. This constructor is noexcept if that constructor of buffer_type is.

Exception specification

This function is potentially-throwing unless std::is_nothrow_constructible<buffer_type, buffer_type &&, const allocator_type &>::value.

Parameters

Name

Description

src

The bitset to move from.

alloc

The allocator to use.

Postconditions

  • src.size() == 0 and src.num_blocks() == 0, i.e. src is left empty, and can be used like any other empty bitset.

Created with MrDocs