[dune-pdelab] More constructors for ISTL***Container [patch]

Markus Blatt markus at dr-blatt.de
Mon May 12 17:56:22 CEST 2014


On Mon, May 12, 2014 at 05:24:38PM +0200, Oliver Sander wrote:
> Am 12.05.2014 17:09, schrieb Markus Blatt:
> > On Sat, May 03, 2014 at 08:16:50AM +0200, Oliver Sander wrote:
>
> This was intentional.  The goal was to allow to code simple algorithms
> simply, in this case: create a matrix object on the stack -- assemble
> into it -- solve -- done.  I don't want to have to explain reference
> counting just for this.  

You are just postponing it and probably making the
bugfixing/explaining more work.. Just wait until the first person sets
up the container in function and passes the backend out...

Seems like an application area for move semantics. Maybe we should
make the containers aware of it.

> If you have more complicated scenarios you are
> still free to use shared_ptrs.
> 
> In my view this follows the C++ philosophy: give the users lot's of freedom,
> in particular the freedom to shoot themselves in the foot :-)

Shoot yourself in the foot if you do memory management (like reference
counting), I guess. Which you want to prevent people from.

-- 
Do you need more support with DUNE or HPC in general? 

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20140512/dcc7e683/attachment.sig>


More information about the dune-pdelab mailing list