This header contains definitions for manipulating the bits of a provided object or pointer.
| Syntax | Description |
ToT bit_cast(const FromT& x) |
Perform a bitcast of FromT to ToT - Template Parameters
-
| ToT | Type to cast to |
| FromT | Type of the value |
- Parameters
-
- Returns
- A value containing a bitwise copy of the input
|
void* bit_and(void* arr, const void* mask, size_t n) |
Perform a bitcast of FromT to ToT - Parameters
-
| arr | the array of bytes to modify |
| mask | the mask to and against arr |
| n | the number of bytes |
- Returns
- the pointer \(arr\)
|
void* bit_and_s(void* arr, size_t n0, const void* mask, size_t n1) |
Safe version of fennec::bit_and - Parameters
-
| arr | the array of bytes to modify |
| n0 | the size of arr in bytes |
| mask | the mask to and against arr |
| n1 | the size of mask in bytes |
- Returns
- the pointer arr
|
void* bit_or(void* arr, const void* mask, size_t n) |
Perform a bit-wise or over an array of bytes - Parameters
-
| arr | the array of bytes to modify |
| mask | the mask to or against arr |
| n | the number of bytes |
- Returns
- the pointer arr
|
void* bit_or_s(void* arr, size_t n0, const void* mask, size_t n1) |
Safe version of fennec::bit_or - Parameters
-
| arr | the array of bytes to modify |
| n0 | the size of arr in bytes |
| mask | the mask to or against arr |
| n1 | the size of mask in bytes |
- Returns
- the pointer arr
|
void* bit_xor(void* arr, const void* mask, size_t n) |
Perform a bit-wise or over an array of bytes - Parameters
-
| arr | the array of bytes to modify |
| mask | the mask to or against arr |
| n | the number of bytes |
- Returns
- the pointer arr
|
void* bit_xor_s(void* arr, size_t n0, const void* mask, size_t n1) |
Safe version of fennec::bit_xor - Parameters
-
| arr | the array of bytes to modify |
| n0 | the size of arr in bytes |
| mask | the mask to or against arr |
| n1 | the size of mask in bytes |
- Returns
- the pointer arr
|