boost::dynamic_bitset::test_set

Sets bit pos if val is true, and clears it if val is false.

Synopsis

Declared in <boost/dynamic_bitset/dynamic_bitset.hpp>

bool
test_set(
    size_type pos,
    bool val = true);

Return Value

The previous state of bit pos.

Parameters

Name Description

pos

The position of the bit to set or clear.

val

The value to set the bit at position pos to.

Preconditions

  • pos < this‐>size().

Created with MrDocs