[Dune] 'auto&&' or 'const auto&' ?

Bernd Flemisch bernd at iws.uni-stuttgart.de
Mon Oct 12 15:50:21 CEST 2015


Dear Dune,

should I use 'auto&&' or 'const auto&' in a range-based for-loop over 
the entities of a Dune GridView?

On the one hand, there is
https://www.dune-project.org/doc/doxygen/html/group__GIIteration.html#_details
which says "**always** use 'auto&&'"

On the other hand, there is
http://conan2.iwr.uni-heidelberg.de/git/pdelab/dune-pdelab/commit/d97c563807cd4f9aaa872dfee57c668eda12db59
together with
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63506
which indicates that a GCC bug is triggered when using 'auto&&'.

Kind regards
Bernd

-- 
_______________________________________________________________

Bernd Flemisch                         phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email:bernd at iws.uni-stuttgart.de
D-70569 Stuttgart            url:www.hydrosys.uni-stuttgart.de
_______________________________________________________________





More information about the Dune mailing list