Added basic iterator functions
This commit is contained in:
@@ -26,6 +26,11 @@ namespace basalt
|
|||||||
void swap(darray<T>& other);
|
void swap(darray<T>& other);
|
||||||
void changetag(MEMORY_TAG new_tag);
|
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;
|
||||||
T* operator -(const size_t offset) noexcept;
|
T* operator -(const size_t offset) noexcept;
|
||||||
const T* operator +(const size_t offset) const noexcept;
|
const T* operator +(const size_t offset) const noexcept;
|
||||||
@@ -453,5 +458,21 @@ namespace basalt
|
|||||||
this->m_pdata[this->m_nelements].~T();
|
this->m_pdata[this->m_nelements].~T();
|
||||||
return std::move(tmp);
|
return std::move(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
const T* darray<T>::begin(void) const noexcept
|
||||||
|
{ return this->m_pdata; }
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
const T* darray<T>::end(void) const noexcept
|
||||||
|
{ return this->m_pdata+this->m_nelements; }
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T* darray<T>::begin(void) noexcept
|
||||||
|
{ return this->m_pdata; }
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
T* darray<T>::end(void) noexcept
|
||||||
|
{ return this->m_pdata+this->m_nelements; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user