From 9c5c361fde7856bcf4535a1bb847b50bf037e886 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Sun, 16 Sep 2018 15:53:56 +0200 Subject: [PATCH] array ptr in const op root --- src/include/multi_array_operation.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/multi_array_operation.h b/src/include/multi_array_operation.h index 524beaf..de3451b 100644 --- a/src/include/multi_array_operation.h +++ b/src/include/multi_array_operation.h @@ -173,7 +173,7 @@ namespace MultiArrayTools const T* mDataPtr; mutable IndexType mIndex; mutable size_t mOff = 0; - //std::shared_ptr > mMaPtr; + std::shared_ptr > mMaPtr; // never remove this ptr, otherwise we lose temporary container instances! }; template @@ -663,8 +663,8 @@ namespace MultiArrayTools ConstOperationRoot(std::shared_ptr > maptr, const std::shared_ptr&... indices) : mDataPtr(maptr->data()), - mIndex(maptr->begin()) - //mMaPtr(maptr) + mIndex(maptr->begin()), + mMaPtr(maptr) { mIndex(indices...); }