boost::operator&

Performs a bitwise‐AND of two bitsets.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

template<
    typename Block,
    typename AllocatorOrContainer>
dynamic_bitset<Block, AllocatorOrContainer>
operator&(
    dynamic_bitset<Block, AllocatorOrContainer> const& a,
    dynamic_bitset<Block, AllocatorOrContainer> const& b);

Throws

An allocation error if memory is exhausted (std::bad_alloc if AllocatorOrContainer is a std::allocator).

Return Value

A new bitset which is the bitwise‐AND of the bitsets a and b.

Parameters

Name Description

a

The left operand

b

The right operand

Preconditions

  • a.size() == b.size().

Created with MrDocs