This commit is contained in:
Christian Zimmermann 2020-08-11 18:22:03 +02:00
parent 233a0a7452
commit e18e97b83f
3 changed files with 4 additions and 1 deletions

View file

@ -6,6 +6,7 @@ namespace MultiArrayTools
template <typename T, class Operation>
const T& DynamicOperation<T,Operation>::get(const DExtT& pos) const
{
VCHECK(pos.expl<ET>().val());
return mOp.get(pos.expl<ET>());
}

View file

@ -96,6 +96,7 @@ namespace MultiArrayHelper
struct None
{
static constexpr size_t VAL = 0;
None() = default;
None(const None& in) = default;
None(None&& in) = default;
@ -110,6 +111,7 @@ namespace MultiArrayHelper
inline None operator+(const None& in) const { return None(); }
inline None operator*(size_t in) const { return None(); }
inline const size_t& val() const { assert(0); return VAL; }
inline void zero() {}
template <class Y>

View file

@ -91,7 +91,7 @@ namespace MultiArrayHelper
static constexpr size_t NUM = X::SIZE;
static constexpr size_t SIZE = NUM + 1;
DExtTX() = default;
DExtTX() { mDExt = std::make_shared<ExtT<None>>(); }
DExtTX(const DExtTX& in) : mDExt(in.mDExt->deepCopy()), mNext(in.mNext) {}
DExtTX(DExtTX&& in) : mDExt(in.mDExt->deepCopy()), mNext(in.mNext) {}
DExtTX& operator=(const DExtTX& in) { mNext = in.mNext; mDExt = in.mDExt->deepCopy(); }