Fixed StrideSpan operator[] for const spans.
This commit is contained in:
parent
27b163f4db
commit
6cac3a655b
@ -229,7 +229,7 @@ template<typename T>
|
|||||||
auto StrideSpan<T>::operator[](size_type index) const -> const_reference
|
auto StrideSpan<T>::operator[](size_type index) const -> const_reference
|
||||||
{
|
{
|
||||||
MIJIN_ASSERT(index < size(), "Attempting to access StrideSpan out of bounds.");
|
MIJIN_ASSERT(index < size(), "Attempting to access StrideSpan out of bounds.");
|
||||||
return byteoffset(begin_, index * strideBytes_);
|
return *byteoffset(begin_, index * strideBytes_);
|
||||||
}
|
}
|
||||||
} // namespace mijin
|
} // namespace mijin
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user