From: Matthias Maier Date: Thu, 3 Sep 2015 04:15:06 +0000 (-0500) Subject: Bugfix: Promote VectorizedArray to a scalar type X-Git-Tag: v8.4.0-rc2~466^2~23 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=377e5d243659b14d581cd8295d011b1afe0193f9;p=dealii.git Bugfix: Promote VectorizedArray to a scalar type Now, every operation concerning Tensors are guarded with the EnableIfScalar type trait. Consequently, a VectorizedArray has also to be made a scalar type. --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 1a34d8bb41..066905e958 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -47,11 +47,11 @@ // forward declarations DEAL_II_NAMESPACE_OPEN - template class VectorizedArray; - +template struct EnableIfScalar; DEAL_II_NAMESPACE_CLOSE + namespace std { template ::dealii::VectorizedArray @@ -65,9 +65,19 @@ namespace std } - DEAL_II_NAMESPACE_OPEN + +// Enable the EnableIfScalar type trait for VectorizedArray such +// that it can be used as a Number type in Tensor, etc. + +template +struct EnableIfScalar > +{ + typedef VectorizedArray::type> type; +}; + + /** * This generic class defines a unified interface to a vectorized data type. * For general template arguments, this class simply corresponds to the