API documentation
#include <arrayhelpers.h>
Functions
Class definitions
-
template<class T>
class Span A limited implementation of
std::span.Public Functions
-
template<size_t n>
Span(T (&arr)[n]) Create a Span with
nelements.- Template Parameters:
n – Number of elements.
- Parameters:
arr – Array.
-
T &operator[](size_t const idx)
Get a reference to the element indexed by
idx.- Parameters:
idx – Index.
- Returns:
Reference to element.
-
T const &operator[](size_t const idx) const
Get a reference to the element indexed by
idx.- Parameters:
idx – Index.
- Returns:
Reference to element.
-
T const *begin() const
Get a pointer to the start of the array.
- Returns:
Pointer to the start of the array.
-
T const *end() const
Get a pointer to the end of the array.
- Returns:
Pointer to the end of the array.
-
size_t size() const
Get the number of elements.
- Returns:
Array size.
-
template<size_t n>