[Dune] dune-grid r4390 - trunk/grid/alugrid/3d

Oliver Sander sander at mi.fu-berlin.de
Wed Sep 17 11:04:20 CEST 2008


Hi Dune!
Apparently, the official C++0x solution for this problem is the use of
the new nullptr keyword.  see
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf

Maybe we should anticipate that somehow.

regards,
Oliver

mnolte at dune-project.org schrieb:
> Author: mnolte
> Date: 2008-09-17 10:38:14 +0200 (Wed, 17 Sep 2008)
> New Revision: 4390
>
> Modified:
>    trunk/grid/alugrid/3d/alu3diterators.hh
> Log:
> again, add some casts to make gcc-4.3.1 with -std=c++0x happy
>
>
> Modified: trunk/grid/alugrid/3d/alu3diterators.hh
> ===================================================================
> --- trunk/grid/alugrid/3d/alu3diterators.hh	2008-09-16 12:55:34 UTC (rev 4389)
> +++ trunk/grid/alugrid/3d/alu3diterators.hh	2008-09-17 08:38:14 UTC (rev 4390)
> @@ -312,9 +312,11 @@
>      mutable val_t elem_;
>    public:  
>      // constructor creating Iterator 
> -    template <class GridImp> 
> -    ALU3dGridLeafIteratorWrapper (const GridImp & grid, int level, const int links )
> -      : it_(grid.myGrid(), StopRule_t() ) , elem_(0,0) {}
> +    template< class GridImp >
> +    ALU3dGridLeafIteratorWrapper ( const GridImp &grid, int level, const int links )
> +    : it_( grid.myGrid(), StopRule_t() ),
> +      elem_( (ElType *)0, (HBndSegType *)0 )
> +    {}
>  
>      // constructor copying iterator 
>      ALU3dGridLeafIteratorWrapper (const ALU3dGridLeafIteratorWrapper  & org )
> @@ -354,9 +356,11 @@
>      mutable val_t elem_;
>    public:
>      // constructor creating Iterator 
> -    template <class GridImp> 
> -    ALU3dGridLeafIteratorWrapper (const GridImp & grid, int level, const int links )
> -      : it_(grid.myGrid(), StopRule_t() ), elem_(0,0) {}
> +    template< class GridImp >
> +    ALU3dGridLeafIteratorWrapper ( const GridImp &grid, int level, const int links )
> +    : it_( grid.myGrid(), StopRule_t() ),
> +      elem_( (ElType *)0, (HBndSegType *)0 )
> +    {}
>  
>      // constructor copying iterator 
>      ALU3dGridLeafIteratorWrapper (const ALU3dGridLeafIteratorWrapper  & org )
> @@ -397,13 +401,13 @@
>      const StopRule_t rule_;
>      
>      // constructor creating iterator 
> -    template <class GridImp> 
> -    ALU3dGridLeafIteratorWrapper (const GridImp & grid, int level , const int nlinks ) 
> -      : vxList_ (grid.getLeafVertexList())
> -      , count_(0)
> -      , size_(vxList_.size())
> -      , elem_(0,0)
> -      , rule_()
> +    template< class GridImp >
> +    ALU3dGridLeafIteratorWrapper ( const GridImp &grid, int level, const int nlinks )
> +    : vxList_( grid.getLeafVertexList() ),
> +      count_( 0 ),
> +      size_( vxList_.size() ),
> +      elem_( (ElType *)0, (HBndSegType *)0 ),
> +      rule_()
>      {
>        assert( vxList_.up2Date() );
>      }
> @@ -997,19 +1001,20 @@
>  
>    private:  
>      typedef Dune :: ALU3dGridItemListType GhostItemListType; 
> -    GhostItemListType & ghList_;
> +    GhostItemListType &ghList_;
>      typedef typename GhostItemListType :: IteratorType IteratorType; 
>      IteratorType curr_; 
>      IteratorType end_; 
>      mutable val_t elem_;
>      mutable int count_;
> +
>    public:
> -    template <class GhostElementIteratorImp, class GridImp>
> -    ALU3dGridGhostIteratorHigherCodim(GhostElementIteratorImp *, const GridImp & grid, 
> -                        int level , const int nlinks, GhostItemListType & ghList) 
> -      : ghList_( ghList )
> -      , elem_(0,0)
> -      , count_(0)
> +    template< class GhostElementIteratorImp, class GridImp >
> +    ALU3dGridGhostIteratorHigherCodim ( GhostElementIteratorImp *, const GridImp &grid, 
> +                                        int level, const int nlinks, GhostItemListType &ghList )
> +    : ghList_( ghList ),
> +      elem_( (ElType *)0, (HBndSegType *)0 ),
> +      count_( 0 )
>      {
>        if( ! ghList_.up2Date() )
>        {
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>   


-- 
************************************************************************
* Oliver Sander                ** email: sander at mi.fu-berlin.de        *
* Freie Universität Berlin     ** phone: + 49 (30) 838 75217           *
* Institut für Mathematik      ** URL  : page.mi.fu-berlin.de/~sander  *
* Arnimallee 6                 ** -------------------------------------*
* 14195 Berlin, Germany        ** Member of MATHEON (www.matheon.de)   *
************************************************************************





More information about the Dune mailing list