bitpack a value into an exact number of specified bits. If applied to an array it will be applied to each element of the array, not the total bits in the array
More...
#include <serdes_format_modifiers.h>
|
| bitpack (T &&v, ST &&b) noexcept |
| Construct a new bitpack object from a rvalue value, and rvalue bit length. More...
|
|
| bitpack (T &v, ST &&b) noexcept |
| Construct a new bitpack object from a reference value, and rvalue bit length. More...
|
|
| bitpack (T &v, const ST &b) noexcept |
| Construct a new bitpack object from a reference value, and reference bit length. More...
|
|
| bitpack (T &&v, const ST &b) noexcept |
| Construct a new bitpack object from a rvalue value, and reference bit length. More...
|
|
|
T & | value |
| a reference to the bitpacked value
|
|
const ST & | bits |
| a reference to the number of bits to use when storing/loading the referenced value
|
|
template<typename T, typename ST>
struct serdes::bitpack< T, ST >
bitpack a value into an exact number of specified bits. If applied to an array it will be applied to each element of the array, not the total bits in the array
- Template Parameters
-
T | the type of the value bitpacked |
ST | the size type of the bit length value |
- Examples:
- 01_simple_example.cpp, 03_serial_usage.cpp, 05_nested_object_oriented_serial.cpp, 06_variable_length_formats.cpp, and 09_runtime_edittable_formats.cpp.
template<typename T, typename ST>
Construct a new bitpack object from a rvalue value, and rvalue bit length.
- Parameters
-
v | referenced value |
b | number of bits to pack into |
template<typename T, typename ST>
Construct a new bitpack object from a reference value, and rvalue bit length.
- Parameters
-
v | referenced value |
b | number of bits to pack into |
template<typename T, typename ST>
Construct a new bitpack object from a reference value, and reference bit length.
- Parameters
-
v | referenced value |
b | number of bits to pack into |
template<typename T, typename ST>
Construct a new bitpack object from a rvalue value, and reference bit length.
- Parameters
-
v | referenced value |
b | number of bits to pack into |
The documentation for this struct was generated from the following file: