template<typename T, ptrdiff_t Size = -1>
struct ble::ArrayView< T, Size >
Immutable view to an array.
Array views encapsulate the pointer to an array and its size into a single object or type; however, it does not manage the lifetime of the array viewed. You can use instances of ArrayView to replace the traditional pair of pointer and size arguments in function calls.
You can use the size member function to query the number of elements present in the array, and overloads of the subscript operator allow code using this object to access to the content of the array viewed.
- You can create ArrayView instances with the help of the function template make_ArrayView() and make_const_ArrayView().
ArrayView<T, Size> objects can be implicitly converted to ArrayView<T> objects where required.
- Template Parameters
|T||type of objects held by the array. |
|Size||The size of the array viewed. The default value ARRAY_VIEW_DYNAMIC_SIZE is special as it allows construction of ArrayView objects of any size (set at runtime). |
Definition at line 70 of file ArrayView.h.