[Dune-devel] Reference and pointer type when dereferencing EntityPointer

Christian Engwer christian.engwer at uni-muenster.de
Tue Oct 14 10:05:37 CEST 2014


Hi Steffen,

> to my rather big surprise I just learned that operator* and operator-> in the EntityPointer facade
> have always returned the Entity by non-const reference / pointer. It has been like that pretty much
> forever (those lines were last changed in 2005!).

I'm tempted to say that is due to our limited C++ experience in the
older days... The entity had only const methods, so at the first glace
one solution was as good as the other. And obviously nobody every
properly looked at it after the first couple of years.

Christian




More information about the Dune-devel mailing list