template <typename OtherNumber>
Tensor<0,dim,Number> &operator = (const Tensor<0,dim,OtherNumber> &rhs);
+ /**
+ * Assignment from tensors with same underlying scalar type.
+ */
+ Tensor &operator = (const Tensor<0,dim,Number> &rhs);
+
/**
* This operator assigns a scalar to a tensor. This obviously requires
* that the @p OtherNumber type is convertible to @p Number.
template <typename OtherNumber>
inline
Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Tensor<0,dim,OtherNumber> &p)
+{
+ value = internal::NumberType<Number>::value(p);
+ return *this;
+}
+
+
+template <int dim, typename Number>
+inline
+Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Tensor<0,dim,Number> &p)
{
value = p.value;
return *this;