[ox/std] Add ox::Array

This commit is contained in:
2022-02-03 21:45:45 -06:00
parent 7459d687b0
commit 27f5523e70
4 changed files with 382 additions and 12 deletions

View File

@@ -233,35 +233,35 @@ class Vector: detail::SmallVector<T, SmallVectorSize> {
~Vector();
constexpr iterator<> begin() const noexcept {
constexpr iterator<> begin() noexcept {
return iterator<>(m_items, 0, m_size);
}
constexpr iterator<> end() const noexcept {
constexpr iterator<> end() noexcept {
return iterator<>(m_items, m_size, m_size);
}
constexpr iterator<const T&, const T*> cbegin() const noexcept {
constexpr iterator<const T&, const T*> begin() const noexcept {
return iterator<const T&, const T*>(m_items, 0, m_size);
}
constexpr iterator<const T&, const T*> cend() const noexcept {
constexpr iterator<const T&, const T*> end() const noexcept {
return iterator<const T&, const T*>(m_items, m_size, m_size);
}
constexpr iterator<T&, T*, true> rbegin() const noexcept {
constexpr iterator<T&, T*, true> rbegin() noexcept {
return iterator<T&, T*, true>(m_items, m_size - 1, m_size);
}
constexpr iterator<T&, T*, true> rend() const noexcept {
constexpr iterator<T&, T*, true> rend() noexcept {
return iterator<T&, T*, true>(m_items, MaxValue<size_type>, m_size);
}
constexpr iterator<const T&, const T*, true> crbegin() const noexcept {
constexpr iterator<const T&, const T*, true> rbegin() const noexcept {
return iterator<const T&, const T*, true>(m_items, m_size - 1, m_size);
}
constexpr iterator<const T&, const T*, true> crend() const noexcept {
constexpr iterator<const T&, const T*, true> rend() const noexcept {
return iterator<const T&, const T*, true>(m_items, MaxValue<size_type>, m_size);
}