inline
SymmetricTensor<rank,dim,Number>
operator * (const SymmetricTensor<rank,dim,Number> &t,
- const Number factor)
+ const Number &factor)
{
SymmetricTensor<rank,dim,Number> tt = t;
tt *= factor;
template <int rank, int dim, typename Number>
inline
SymmetricTensor<rank,dim,Number>
-operator * (const Number factor,
+operator * (const Number &factor,
const SymmetricTensor<rank,dim,Number> &t)
{
// simply forward to the other operator
inline
SymmetricTensor<rank,dim,typename ProductType<Number,typename EnableIfScalar<OtherNumber>::type>::type>
operator * (const SymmetricTensor<rank,dim,Number> &t,
- const OtherNumber factor)
+ const OtherNumber &factor)
{
// form the product. we have to convert the two factors into the final
// type via explicit casts because, for awkward reasons, the C++
*/
template <int rank, int dim, typename Number, typename OtherNumber>
inline
-SymmetricTensor<rank,dim,typename ProductType<Number,typename EnableIfScalar<OtherNumber>::type>::type>
-operator * (const Number factor,
+SymmetricTensor<rank,dim,typename ProductType<OtherNumber,typename EnableIfScalar<Number>::type>::type>
+operator * (const Number &factor,
const SymmetricTensor<rank,dim,OtherNumber> &t)
{
// simply forward to the other operator with switched arguments