[ox/std] Add missing iterator functions to String and Vector
This commit is contained in:
16
deps/ox/src/ox/std/vector.hpp
vendored
16
deps/ox/src/ox/std/vector.hpp
vendored
@@ -249,6 +249,14 @@ class Vector: detail::SmallVector<T, SmallVectorSize> {
|
||||
return iterator<const T&, const T*>(m_items, m_size, m_size);
|
||||
}
|
||||
|
||||
constexpr iterator<const T&, const T*> cbegin() const noexcept {
|
||||
return iterator<const T&, const T*>(m_items, 0, m_size);
|
||||
}
|
||||
|
||||
constexpr iterator<const T&, const T*> cend() const noexcept {
|
||||
return iterator<const T&, const T*>(m_items, m_size, m_size);
|
||||
}
|
||||
|
||||
constexpr iterator<T&, T*, true> rbegin() noexcept {
|
||||
return iterator<T&, T*, true>(m_items, m_size - 1, m_size);
|
||||
}
|
||||
@@ -257,6 +265,14 @@ class Vector: detail::SmallVector<T, SmallVectorSize> {
|
||||
return iterator<T&, T*, true>(m_items, MaxValue<size_type>, m_size);
|
||||
}
|
||||
|
||||
constexpr iterator<const T&, const T*, true> crbegin() 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 {
|
||||
return iterator<const T&, const T*, true>(m_items, MaxValue<size_type>, m_size);
|
||||
}
|
||||
|
||||
constexpr iterator<const T&, const T*, true> rbegin() const noexcept {
|
||||
return iterator<const T&, const T*, true>(m_items, m_size - 1, m_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user