]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explicitly provide ProductType for Tensor<1,dim> in non-C++11 mode.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 25 Feb 2015 13:56:30 +0000 (07:56 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 25 Feb 2015 14:06:31 +0000 (08:06 -0600)
include/deal.II/base/tensor_base.h

index e65ddfbeb23abe05e5ff5da983da654c341462ff..4b2538aa3d0668c5ba3911f120c165951e2c3e24 100644 (file)
@@ -1350,6 +1350,22 @@ operator * (const Number                factor,
 }
 
 
+#ifndef DEAL_II_WITH_CXX11
+
+template <typename T, typename U, int dim>
+struct ProductType<T,Tensor<1,dim,U> >
+{
+  typedef Tensor<1,dim,typename ProductType<T,U>::type> type;
+};
+
+template <typename T, typename U, int dim>
+struct ProductType<Tensor<1,dim,T>,U>
+{
+  typedef Tensor<1,dim,typename ProductType<T,U>::type> type;
+};
+
+#endif
+
 /**
  * Multiplication of a tensor of rank 1 with a scalar number from the right.
  *

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.