folly::Bits::set

set overloads

Synopses

Declared in <folly/lang/BitsClass.h>

Set the given bit.

static
void
set(
    T* p,
    size_t bit);
» more...

Set count contiguous bits starting at bitStart to the values from the least significant count bits of value; little endian. (value & 1 becomes the bit at bitStart, etc) Precondition: count <= sizeof(T) * 8 Precondition: value can fit in 'count' bits

static
void
set(
    T* p,
    size_t bitStart,
    size_t count,
    UnderlyingType value);
» more...

Parameters

NameDescription
pPointer to the first block of the array.
bitThe bit position to set.
bitStartThe bit position of the first bit to set.
countThe number of contiguous bits to set.
valueThe value whose low count bits are written.