[Dune] Fwd: Re: [Dune-Commit] dune-grid r7005 - trunk/dune/grid/sgrid
Martin Nolte
nolte at mathematik.uni-freiburg.de
Thu Oct 14 15:57:52 CEST 2010
Just replying to an eMail from the mailing list simply does not work! Could
this be improved?
-------- Original Message --------
Subject: Re: [Dune] [Dune-Commit] dune-grid r7005 - trunk/dune/grid/sgrid
Date: Thu, 14 Oct 2010 09:54:22 +0200
From: Martin Nolte <nolte at mathematik.uni-freiburg.de>
To: Christian Engwer <christi at uni-hd.de>
Hi Christian,
I don't know. I thought that c++0x array is used, if available, then
tr1::array, if available and otherwise our implementation. In other words, if
someone disables c++0x in gcc-4.4, he will end up with tr1::array and then the
code would be wrong.
Anyway, when I ran dunecontrol over all my stuff yesterday, I got the error
message that array does not have a method fill, so I made it work. Maybe the
best solution is to provide a fill method for tr1::array, i.e., derive
Dune::Array from tr1::array and implement fill through assign. But I would
like to leave these decisions up to others (read you).
Best,
Martin
On 10/13/2010 11:22 PM, Christian Engwer wrote:
> Hi Martin,
>
> I am somewhat surprised. Reading the code in array.hh I
> assumed that only std::array is used, not the one in tr1.
>
> The standard says that c++0x has array::fill, while tr1 uses
> array::assign.
>
> Christian
>
> On Wed, Oct 13, 2010 at 09:34:24PM +0200, mnolte at dune-project.org wrote:
>> Author: mnolte
>> Date: 2010-10-13 21:34:23 +0200 (Wed, 13 Oct 2010)
>> New Revision: 7005
>>
>> Modified:
>> trunk/dune/grid/sgrid/numbering.cc
>> Log:
>> array::fill does not always exist (is it called assign in TR1?)
>>
>>
>> Modified: trunk/dune/grid/sgrid/numbering.cc
>> ===================================================================
>> --- trunk/dune/grid/sgrid/numbering.cc 2010-10-13 13:41:28 UTC (rev 7004)
>> +++ trunk/dune/grid/sgrid/numbering.cc 2010-10-13 19:34:23 UTC (rev 7005)
>> @@ -103,7 +103,7 @@
>> CubeMapper<dim>::CubeMapper ()
>> {
>> array<int,dim> M;
>> - M.fill(1);
>> + std::fill( M.begin(), M.end(), 1 );
>> make(M);
>> }
>>
>>
>>
>> _______________________________________________
>> Dune-Commit mailing list
>> Dune-Commit at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-commit
>>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
--
Martin Nolte <nolte at mathematik.uni-freiburg.de>
Universität Freiburg phone: +49-761-203-5642
Abteilung für angewandte Mathematik fax: +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany
More information about the Dune
mailing list