Raw pointers in metagrid construction
I came around using meta grids for the first time and stumbled over the available constructors. Many of these (e.g. GeometryGrid
, several others in dune-metagrid) seem to have two constructors, one taking a reference to the host grid and one taking a raw pointer to it. In the latter case, the meta grid takes ownership of the host grid. I would like to deprecate the raw pointer one and replace it with either a shared_ptr
or a unique_ptr
as it is the cleaner way of implementing the ownership transfer nowadays. One could even go further and also deprecate the version that takes a reference, as it is prone to create object lifetime issues. Are there opinions on this?