From 6cac3a655b950a9c4dd39e4cac1746bea1921fe4 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sun, 26 Nov 2023 22:42:33 +0100 Subject: [PATCH] Fixed StrideSpan operator[] for const spans. --- source/mijin/container/stride_span.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/mijin/container/stride_span.hpp b/source/mijin/container/stride_span.hpp index 33aed97..87770ca 100644 --- a/source/mijin/container/stride_span.hpp +++ b/source/mijin/container/stride_span.hpp @@ -229,7 +229,7 @@ template auto StrideSpan::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