[Dune] Comments on Dune Developer Meeting 2014.

Robert Kloefkorn robertk at posteo.de
Thu Sep 25 15:34:31 CEST 2014


Hi Martin,

the ranged based for does not need a postfix iterator.
See here:
http://www.codesynthesis.com/~boris/blog/2012/05/16/cxx11-range-based-for-loop/
or here:
http://en.cppreference.com/w/cpp/language/range-for
I'm pretty sure that you'll find the same code snippet in the standard.

As you can see, only the prefix increment is used.

So I still don't see the argument for having a postfix increment. Also,
I don't think that my proposal does protect you from yourself, since the
usage of the postfix iterator is still possible, you just have to do a
tiny little amount of work to use it.

Best,

Rob




More information about the Dune mailing list