Reference to a bit.

Synopsis

Declared in <folly/container/detail/BitIteratorDetail.h>

template<
    class Ref,
    class Value>
class BitReference;

Description

Templatize on both parent reference and value types to capture const‐ness correctly and to work with the case where Ref is a reference‐like type (not T&), just like our BitReference here.

Member Functions

Name

Description

BitReference [constructor]

Construct a reference to a single bit within a parent reference.

operator=

Assign a boolean value to the referenced bit.

clear

Clear the referenced bit to 0.

flip

Toggle the referenced bit.

set

Set the referenced bit to 1.

operator bool

Return the value of the referenced bit.

Created with MrDocs