From: Martin Kronbichler Date: Tue, 16 Aug 2011 12:13:33 +0000 (+0000) Subject: Avoid compiler error. X-Git-Tag: v8.0.0~3680 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b1e0c58040c2e2204a4e91e8a1c54f94942b040;p=dealii.git Avoid compiler error. git-svn-id: https://svn.dealii.org/trunk@24088 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/tensor_base.h b/deal.II/include/deal.II/base/tensor_base.h index ed309aeef7..2aa96ab57b 100644 --- a/deal.II/include/deal.II/base/tensor_base.h +++ b/deal.II/include/deal.II/base/tensor_base.h @@ -887,8 +887,13 @@ inline Tensor<1,dim,Number>::Tensor (const bool initialize) { if (initialize) - for (unsigned int i=0; i!=dim; ++i) - values[i] = 0; + // need to create an object Number(0) to + // initialize to zero to avoid confusion with + // Tensor::operator=(scalar) when using + // something like + // Tensor<1,dim,Tensor<1,dim,Number> >. + for (unsigned int i=0; i