[Dune-devel] Why does MPIHelper::instance return a non-const reference?
Oliver Sander
oliver.sander at tu-dresden.de
Thu Oct 25 17:22:32 CEST 2018
Dear Dune,
I recently noticed that the method MPIHelper::instance returns a reference
to MPIHelper that is non-const. However, there is nothing I can do with an MPIHelper
that would require non-constness. Is there a subtle reason I fail to see?
Unfortunately, adding the const is difficult, because it breaks all code
that captures the return value of 'instance' by a non-const reference.
Should we at least advise our users that what 'instance' returns is
practically a const reference?
Thanks,
Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20181025/0089898e/attachment.sig>
More information about the Dune-devel
mailing list