|  | reflex::Bits::Bitref Struct Reference updated Fri May 16 2025 by Robert van Engelen |

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
reflex::Bits::Bitref Struct Reference

References a single bit, returned by operator[]. More...

`#include <bits.h>`

## Public Member Functions
| Bitref (size_t n, uint64_t *p)
| operator bool () const
| Returns bit value. More...
const Bitref & | operator= (bool b) const
| Assign bit value. More...
bool | operator|= (bool b) const
| Bit-or bit value. More...
bool | operator&= (bool b) const
| Bit-and bit value. More...
bool | operator^= (bool b) const
| Bit-xor bit value. More...

## Public Attributes
uint64_t | m
| mask m = 2^n More...
uint64_t * | p

## Detailed Description

References a single bit, returned by operator[].

## Constructor & Destructor Documentation

reflex::Bits::Bitref::Bitref | ( | size_t | n,
|  | uint64_t * | p
| ) |  |
| inline

Parameters

  n | n'th bit
  p | in this word

## Member Function Documentation

reflex::Bits::Bitref::operator bool | ( |  | ) | const
| inline

Returns bit value.

Returns
  bit value true or false.

bool reflex::Bits::Bitref::operator&= | ( | bool | b | ) | const
| inline

Bit-and bit value.

Returns
  result value true or false.

Parameters

  b | bit-and with this bit

const Bitref& reflex::Bits::Bitref::operator= | ( | bool | b | ) | const
| inline

Assign bit value.

Returns
  result value true or false.

Parameters

  b | bit to assign

bool reflex::Bits::Bitref::operator^= | ( | bool | b | ) | const
| inline

Bit-xor bit value.

Returns
  result value true or false.

Parameters

  b | bit-xor with this bit

bool reflex::Bits::Bitref::operator|= | ( | bool | b | ) | const
| inline

Bit-or bit value.

Returns
  result value true or false.

Parameters

  b | bit-or with this bit

## Member Data Documentation

uint64_t reflex::Bits::Bitref::m

mask m = 2^n

uint64_t* reflex::Bits::Bitref::p

in this word

The documentation for this struct was generated from the following file:

- bits.h