[ox/std] Make Span::operator[] const

(synced from ae81f6b3de)
This commit is contained in:
2025-05-13 22:02:23 -05:00
parent 07a3d73a73
commit 6eeff3a448
+1 -6
View File
@@ -146,12 +146,7 @@ class Span {
return iterator<const T&, const T*, true>(m_items, MaxValue<size_type>, m_size);
}
constexpr T &operator[](std::size_t i) noexcept {
boundsCheck(__FILE__, __LINE__, i, size(), "Span access overflow");
return m_items[i];
}
constexpr T const&operator[](std::size_t i) const noexcept {
constexpr T &operator[](std::size_t i) const noexcept {
boundsCheck(__FILE__, __LINE__, i, size(), "Span access overflow");
return m_items[i];
}