From 5415945461308ea3d47d0c60954c48325cc48e90 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 6 Sep 2015 20:05:16 -0500 Subject: [PATCH] Bugfix: Do not use C++11 features --- include/deal.II/base/tensor_base.h | 32 ++++++++++-------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/include/deal.II/base/tensor_base.h b/include/deal.II/base/tensor_base.h index 98c60b24e1..24fa78fded 100644 --- a/include/deal.II/base/tensor_base.h +++ b/include/deal.II/base/tensor_base.h @@ -179,8 +179,7 @@ public: /** * Assignment operator. */ - template - Tensor<0,dim,Number> &operator = (const OtherNumber d); + Tensor<0,dim,Number> &operator = (const Number d); /** * Test for equality of two tensors. @@ -451,12 +450,8 @@ public: * exactly it means to assign a scalar value to a tensor, zero is the only * value allowed for d, allowing the intuitive notation * t=0 to reset all elements of the tensor to zero. - * - * @relates EnableIfScalar */ - template ::type> - Tensor &operator = (const OtherNumber d); + Tensor &operator = (const Number d); /** * Test for equality of two tensors. @@ -695,9 +690,8 @@ Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Tensor<0,dim,Other template -template inline -Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const OtherNumber d) +Tensor<0,dim,Number> &Tensor<0,dim,Number>::operator = (const Number d) { Assert(dim != 0 || d == OtherNumber(), ExcMessage("Cannot assign a non-zero scalar to a Tensor<0,0,Number> object.")); @@ -1006,12 +1000,11 @@ Tensor::operator = (const Tensor &t) template -template inline Tensor & -Tensor::operator = (const OtherNumber d) +Tensor::operator = (const Number d) { - Assert (d == OtherNumber(), ExcMessage ("Only assignment with zero is allowed")); + Assert (d == Number(), ExcMessage ("Only assignment with zero is allowed")); (void) d; for (unsigned int i=0; i,U> */ template ::type> + typename OtherNumber> inline -Tensor::type> +Tensor::type>::type> operator * (const Tensor &t, const OtherNumber factor) { @@ -1305,10 +1297,9 @@ operator * (const Tensor &t, */ template ::type> + typename OtherNumber> inline -Tensor::type> +Tensor::type, OtherNumber>::type> operator * (const Number factor, const Tensor &t) { @@ -1327,10 +1318,9 @@ operator * (const Number factor, */ template ::type> + typename OtherNumber> inline -Tensor::type> +Tensor::type>::type> operator / (const Tensor &t, const OtherNumber factor) { -- 2.39.5