From: kronbichler Date: Tue, 16 Aug 2011 12:13:33 +0000 (+0000) Subject: Avoid compiler error. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7de5f0c6324ab3e21d0966a8c865028a7f05edb0;p=dealii-svn.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