Commit 11db7687 authored by Oliver Sander's avatar Oliver Sander

[!298] Make file readers return ToUniquePtr instead of a C pointer

Merge branch 'feature/grid-readers-return-to_unique_ptr' into 'master'

At the 2017 developer meeting in Heidelberg it was decided that file reading
methods should return a std::unique\_ptr of the resulting grid, rather than a
C pointer. The reason is that a std::unique\_ptr makes it clear that the
caller receives the ownership of the new object.

Simply changing the return types of the relevant methods is not an option, as
it will break a lot of user code. Instead the class ToUniquePtr was introduced
in dune-common. It is a costum pointer class that casts into C-style pointers,
std::shared\_ptr, and std::unique\_ptr. Casting to a C-style pointer will
result in a deprecation warning. Using this class for at least one release
will allow a much smoother transition.

See merge request !298
parents 04e553dc 528b5cc6
Pipeline #10483 passed with stage
in 38 minutes and 57 seconds