From: Matthias Maier Date: Mon, 7 Sep 2015 01:05:16 +0000 (-0500) Subject: Bugfix: Do not use C++11 features X-Git-Tag: v8.4.0-rc2~466^2~15 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5415945461308ea3d47d0c60954c48325cc48e90;p=dealii.git Bugfix: Do not use C++11 features --- 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) {