]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Default copy assignement in Tensor for non-Intel compilers 6505/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 6 May 2018 15:25:28 +0000 (17:25 +0200)
committerMatthias Maier <tamiko@43-1.org>
Sun, 6 May 2018 21:15:02 +0000 (16:15 -0500)
include/deal.II/base/tensor.h

index 03c1591688c587b51b27809f2586a50330e860f4..67fc58dfc3f686ccb5604724f7d3e43c0cf03391 100644 (file)
@@ -209,10 +209,15 @@ public:
   template <typename OtherNumber>
   Tensor &operator = (const Tensor<0,dim,OtherNumber> &rhs);
 
+#ifdef __INTEL_COMPILER
   /**
    * Assignment from tensors with same underlying scalar type.
+   * This is needed for ICC15 because it can't generate a suitable
+   * copy constructor for Sacado::Rad::ADvar types automatically.
+   * See https://github.com/dealii/dealii/pull/5865.
    */
   Tensor &operator = (const Tensor<0,dim,Number> &rhs);
+#endif
 
   /**
    * This operator assigns a scalar to a tensor. This obviously requires
@@ -813,6 +818,7 @@ Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Tensor<0,dim,Other
 }
 
 
+#ifdef __INTEL_COMPILER
 template <int dim, typename Number>
 inline
 Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Tensor<0,dim,Number> &p)
@@ -820,6 +826,7 @@ Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Tensor<0,dim,Numbe
   value = p.value;
   return *this;
 }
+#endif
 
 
 template <int dim, typename Number>

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.