now fixed

This commit is contained in:
Christian Zimmermann 2018-12-25 18:57:51 +01:00
parent 22b93b0612
commit 90816bc471

View file

@ -13,7 +13,9 @@ namespace MultiArrayTools
mInit(in.mInit), mInit(in.mInit),
mRange(in.mRange) mRange(in.mRange)
{ {
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) ); if(mRange){
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) );
}
} }
@ -22,7 +24,9 @@ namespace MultiArrayTools
mInit(in.mInit), mInit(in.mInit),
mRange(in.mRange) mRange(in.mRange)
{ {
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) ); if(mRange){
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) );
}
} }
template <typename T, class... SRanges> template <typename T, class... SRanges>
@ -30,7 +34,9 @@ namespace MultiArrayTools
{ {
mInit = in.mInit; mInit = in.mInit;
mRange = in.mRange; mRange = in.mRange;
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) ); if(mRange){
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) );
}
return *this; return *this;
} }
@ -39,7 +45,9 @@ namespace MultiArrayTools
{ {
mInit = in.mInit; mInit = in.mInit;
mRange = in.mRange; mRange = in.mRange;
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) ); if(mRange){
mProtoI = std::make_shared<IndexType>( mRange, reinterpret_cast<std::intptr_t>(this) );
}
return *this; return *this;
} }