[Dune] Comments on Dune Developer Meeting 2014.

Jö Fahlke jorrit at jorrit.de
Thu Sep 25 17:31:57 CEST 2014


Am Thu, 25. Sep 2014, 16:44:25 +0200 schrieb Robert Kloefkorn:
> Hello Oliver,
> 
> > My argument for proposing the feature in the first place was ease of
> > documentation. I wanted to be able to say "entity iterators are stl
> > forward_iterators period". I don't actually need the postfix
> > increment for anything.  But I am also not a strong believer in
> > protecting the user from herself.  That's just not the C++ way.
> 
> According to the Forward Iterator documentation
> (http://www.cplusplus.com/reference/iterator/ForwardIterator/) you would
> also have to implement the operator->, which in our case does not make
> sense, or it will be very slow and thus does not make sense.

We do implement operator-> in EntityPointer, and EntityIterators inherit it
from there:
http://cgit.dune-project.org/repositories/dune-grid/tree/dune/grid/common/entitypointer.hh#n188

>                                                              The reason
> for that is, that a DUNE grid (in my opinion) is not a container. One
> reason is, that the Entity is a proxy class and not a real object.

I don't understand how "'it->' must be slower than '(*it).'" follows from
that (if that is what meant).

>                                                                    From
> that we deduct: If a DUNE grid is not a STL container why should it's
> iterators behave like STL iterators?

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

Of all the things I've lost, I miss my mind the most.
-- Ozzy Osbourne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140925/a8fdaff8/attachment.sig>


More information about the Dune mailing list