[Dune] [Dune-Commit] dune-grid r7005 - trunk/dune/grid/sgrid

Andreas Dedner dedner at mathematik.uni-freiburg.de
Thu Oct 14 11:42:25 CEST 2010


Hi.

My std::array implementation (from
g++ (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
) has no fill method and on the web I found that one shoud use
the global std::fill(...) method.

Best
Andreas


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
>    





More information about the Dune mailing list