boost::dynamic_bitset::swap

Swaps the contents of this bitset and bitset b.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

void
swap(dynamic_bitset& b) noexcept(/* see-below */);

Description

The underlying containers are swapped by an unqualified call to swap(), with std::swap visible, so that a swap() found by argument‐dependent lookup takes part in overload resolution.

Throws

Nothing if AllocatorOrContainer is an allocator; otherwise, any exception thrown by swapping the underlying containers. This function is noexcept if and only if that swap is.

Exception specification

This function is potentially-throwing unless detail::dynamic_bitset_impl::is_nothrow_swappable<buffer_type>::value.

Parameters

Name

Description

b

The bitset to be swapped with *this.

Preconditions

  • If AllocatorOrContainer is an allocator, std::allocator_traits< allocator_type >::propagate_on_container_swap::value is true or this‐>get_allocator() == b.get_allocator(). Otherwise, the preconditions, if any, of swapping the two underlying containers hold.

Created with MrDocs