diff --git a/include/containers/basalt_darray.h b/include/containers/basalt_darray.h index ce0aee2..7d17521 100644 --- a/include/containers/basalt_darray.h +++ b/include/containers/basalt_darray.h @@ -26,6 +26,11 @@ namespace basalt void swap(darray& other); void changetag(MEMORY_TAG new_tag); + const T* begin(void) const noexcept; + const T* end(void) const noexcept; + T* begin(void) noexcept; + T* end(void) noexcept; + T* operator +(const size_t offset) noexcept; T* operator -(const size_t offset) noexcept; const T* operator +(const size_t offset) const noexcept; @@ -453,5 +458,21 @@ namespace basalt this->m_pdata[this->m_nelements].~T(); return std::move(tmp); } + + template + const T* darray::begin(void) const noexcept + { return this->m_pdata; } + + template + const T* darray::end(void) const noexcept + { return this->m_pdata+this->m_nelements; } + + template + T* darray::begin(void) noexcept + { return this->m_pdata; } + + template + T* darray::end(void) noexcept + { return this->m_pdata+this->m_nelements; } }