Tensor<0, dim, typename ProductType<Number, OtherNumber>::type>
operator+ (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q)
{
- return static_cast<Number>(p) + static_cast<OtherNumber>(q);
+ return static_cast<const Number &>(p) + static_cast<const OtherNumber &>(q);
}
Tensor<0, dim, typename ProductType<Number, OtherNumber>::type>
operator- (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q)
{
- return static_cast<Number>(p) - static_cast<OtherNumber>(q);
+ return static_cast<const Number &>(p) - static_cast<const OtherNumber &>(q);
}
typename ProductType<Number, OtherNumber>::type
operator* (const Tensor<0,dim,Number> &p, const Tensor<0,dim,OtherNumber> &q)
{
- return static_cast<Number>(p) * static_cast<OtherNumber>(q);
+ return static_cast<const Number &>(p) * static_cast<const OtherNumber &>(q);
}
//@}