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

Steffen Müthing steffen.muething at iwr.uni-heidelberg.de
Tue Oct 14 13:25:20 CEST 2014


Am 14.10.2014 um 10:05 schrieb Christian Engwer <christian.engwer at uni-muenster.de>:

> 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.

OK, in that case I propose making those return types const. If nobody cries foul until
tomorrow, I’ll push the change.

Steffen

> 
> Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20141014/04931b1d/attachment.sig>


More information about the Dune-devel mailing list