[ox/std] Make Span::operator[] const
All checks were successful
Build / build (push) Successful in 1m17s

This commit is contained in:
2025-05-13 22:02:23 -05:00
parent c1108301c0
commit ae81f6b3de

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];
}