operator=(double) for multi_array

This commit is contained in:
Christian Zimmermann 2018-09-22 20:19:08 +02:00
parent a55b8d8b9f
commit db32888ce9

View file

@ -81,6 +81,8 @@ namespace MultiArrayTools
operator T() const;
MultiArray& operator=(const T& in);
MultiArray& operator+=(const MultiArray& in);
MultiArray& operator-=(const MultiArray& in);
MultiArray& operator*=(const T& in);
@ -321,6 +323,15 @@ namespace MultiArrayTools
std::move(mCont) );
}
template <typename T, class... SRanges>
MultiArray<T,SRanges...>& MultiArray<T,SRanges...>::operator=(const T& in)
{
for(auto& x: mCont){
x = in;
}
return *this;
}
template <typename T, class... SRanges>
MultiArray<T,SRanges...>& MultiArray<T,SRanges...>::operator+=(const MultiArray& in)
{