a container for fixed or dynamically sized arrays, with an upper bounds limit for safety
More...
#include <serdes_format_modifiers.h>
|
template<size_t max_elements> |
| array (T(&v)[max_elements], const ST &s) noexcept |
| Construct a new array object from an existing array and a referenced size. More...
|
|
template<size_t max_elements> |
| array (T(&v)[max_elements], const ST &&s) noexcept |
| Construct a new array object from an existing array and a rvalue size. More...
|
|
| array (T *v, ST &s, const size_t max_elements) noexcept |
| Construct a new array object from a pointer to the head of the array, a referenced dynamic size, and a constant max size. More...
|
|
| array (T *v, const ST &&s, const size_t max_elements) noexcept |
| Construct a new array object from a pointer to the head of the array, a rvalue dynamic size, and a constant max size. More...
|
|
|
T * | value |
| a pointer to the array head
|
|
const ST & | size |
| a reference to a value that contains the dynamic size of the array
|
|
const size_t | max_size |
| maximum size of the array (used for bounds checking)
|
|
template<typename T, typename ST>
struct serdes::array< T, ST >
a container for fixed or dynamically sized arrays, with an upper bounds limit for safety
- Template Parameters
-
T | the array element type |
ST | the type of the variable used by reference to adjust and report the array size |
- Examples:
- 06_variable_length_formats.cpp, and 13_arrays_of_packets.cpp.
template<typename T, typename ST>
template<size_t max_elements>
Construct a new array object from an existing array and a referenced size.
- Template Parameters
-
max_elements | maximum number of elements in the array |
- Parameters
-
v | reference to the underlying array |
s | reference to a value representing the dynamic array size |
template<typename T, typename ST>
template<size_t max_elements>
Construct a new array object from an existing array and a rvalue size.
- Template Parameters
-
- Parameters
-
v | reference to the underlying array |
s | a rvalue representing the dynamic array size |
template<typename T, typename ST>
Construct a new array object from a pointer to the head of the array, a referenced dynamic size, and a constant max size.
- Parameters
-
v | pointer to the head of the array |
s | reference to a value representing the dynamic array size |
max_elements | maximum size of the array |
template<typename T, typename ST>
Construct a new array object from a pointer to the head of the array, a rvalue dynamic size, and a constant max size.
- Parameters
-
v | pointer to the head of the array |
s | rvalue representing the dynamic array size |
max_elements | maximum size of the array |
The documentation for this struct was generated from the following file: