[ox/std] Add pre- and post-increment operators to Span
Some checks failed
Build / build (push) Failing after 8s

This commit is contained in:
2025-07-26 18:31:55 -05:00
parent 92f74b27d1
commit fbf49ba511

View File

@ -163,6 +163,24 @@ class Span {
return *this;
}
constexpr Span operator++(int) noexcept {
++m_items;
--m_size;
if (!m_size) [[unlikely]] {
m_items = nullptr;
}
return *this;
}
constexpr Span operator++() noexcept {
++m_items;
--m_size;
if (!m_size) [[unlikely]] {
m_items = nullptr;
}
return *this;
}
[[nodiscard]]
constexpr auto data() const noexcept {
return m_items;