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

index f9f02327048261a972d58c579457b443c39d23b7..cabc4643fe3d0bb9f47ce8875dd68090259d0a99 100644 (file)
@@ -2011,6 +2011,23 @@ operator * (const Number                   factor,
 }
 
 
+#ifndef DEAL_II_WITH_CXX11
+
+template <typename T, typename U, int rank, int dim>
+struct ProductType<T,Tensor<rank,dim,U> >
+{
+  typedef Tensor<rank,dim,typename ProductType<T,U>::type> type;
+};
+
+template <typename T, typename U, int rank, int dim>
+struct ProductType<Tensor<rank,dim,T>,U>
+{
+  typedef Tensor<rank,dim,typename ProductType<T,U>::type> type;
+};
+
+#endif
+
+
 /**
  * Multiplication of a tensor of general rank 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.