33 #include "Core/Macro/Macro.h" 34 #include "Utilities/STL/MxVector.h" 59 array_view(std::array<T, N>& array);
60 array_view(std::vector<T>& vec);
61 array_view(MxVector<T>& vec);
62 template<
typename RandomIt>
63 array_view(RandomIt begin, RandomIt end);
67 const T* data()
const;
68 T& operator[](
size_t idx);
69 const T& operator[](
size_t idx)
const;
71 const T& front()
const;
73 const T& back()
const;
77 const T* begin()
const;
87 this->_data =
nullptr;
101 this->_data = vec.data();
102 this->_size = vec.size();
108 this->_data = vec.data();
109 this->_size = vec.size();
121 return this->_size == 0;
139 MX_ASSERT(idx < this->_size);
140 return this->_data[idx];
146 MX_ASSERT(idx < this->_size);
147 return this->_data[idx];
153 MX_ASSERT(this->_size > 0);
154 return this->_data[0];
160 MX_ASSERT(this->_size > 0);
161 return this->_data[0];
167 MX_ASSERT(this->_size > 0);
168 return this->_data[this->_size - 1];
174 MX_ASSERT(this->_size > 0);
175 return this->_data[this->_size - 1];
187 return this->_data + this->_size;
199 return this->_data + this->_size;
214 this->_data = array.data();
219 template<
typename RandomIt>
223 this->_size = end - begin;
Definition: ArrayView.h:44
array_view< T > make_view(T &value)
Definition: ArrayView.h:232
Definition: Application.cpp:49