Fixed StrideSpan operator[] for const spans.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user