Skip to content

Rose::BitOps::bit

Extract a single bit.

Synopsis

Declared in <src/Rose/BitOps.h>

template<typename Unsigned>
bool
bit(
    Unsigned src,
    size_t i);

Description

The bit at position i of the value src is returned. If i is out of range for src then zero is returned.

Return Value

True if the bit is set.

Parameters

Name

Description

src

Input value.

i

Bit index.

Created with MrDocs