Template Class Array1DView

Class Documentation

template<typename T>
class Array1DView

Lightweight non-owning view of 1D array data.

Public Functions

inline T *data() noexcept

Return pointer to the data.

inline const T *data() const noexcept

Return const pointer to the data.

inline int size() const noexcept

Return the size of the array.

inline T &operator[](int idx) const noexcept

Return reference to the element at the given linear index.

Array1DView(const Array1DView&) noexcept = default
Array1DView &operator=(const Array1DView&) noexcept = default