[ox/std] Make Span::operator[] const
All checks were successful
Build / build (push) Successful in 1m17s
All checks were successful
Build / build (push) Successful in 1m17s
This commit is contained in:
7
deps/ox/src/ox/std/span.hpp
vendored
7
deps/ox/src/ox/std/span.hpp
vendored
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user