[Dune] MultiLinearGeometry

Christian Engwer christian.engwer at uni-muenster.de
Sat Oct 13 12:05:41 CEST 2012


Hi Oli,

> >But the real point is that I want to use an allocator to create the
> >geometry (no new for me, please). And you're right here: The
> >std::shared_ptr (C++11) supports this through allocate_shared. Having
> >had a look at gcc's implementation, however, I definitely think that we
> >don't want a fallback for this (extremely complex) code.
>
> Maybe we can have a fallback implementation that simply uses 'new' to
> implement allocate_shared?  That way code would compile on all supported
> compilers, only for best performance you need a recent compiler.

this would then be make_shared... the main idea is to use an
allocator, but still, it shouldn't be difficult to implement a
fallback implementation. The main thing we need is a generic Deleter,
which uses an allocator, similar to the code we added for stackobject_to_shared_ptr.


Please note... the question of implementing allocate_shared is
orthogonal to the discussion about MultiLinearMapping :-)

Christian




More information about the Dune mailing list