Fixed StrideSpan operator[] for const spans.

This commit is contained in:
Patrick 2023-11-26 22:42:33 +01:00
parent 27b163f4db
commit 6cac3a655b

View File

@ -229,7 +229,7 @@ template<typename T>
auto StrideSpan<T>::operator[](size_type index) const -> const_reference
{
MIJIN_ASSERT(index < size(), "Attempting to access StrideSpan out of bounds.");
return byteoffset(begin_, index * strideBytes_);
return *byteoffset(begin_, index * strideBytes_);
}
} // namespace mijin