Skip to content
Snippets Groups Projects
Commit 74a59eff authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

wrap_own_share: add overload for `nullptr_t` to reset shared pointer

parent 3a02d979
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -34,6 +34,12 @@ namespace Dune { ...@@ -34,6 +34,12 @@ namespace Dune {
return std::make_shared<S>(std::move(t)); return std::make_shared<S>(std::move(t));
} }
template<class T>
std::shared_ptr<T> wrap_own_share(std::nullptr_t)
{
return {};
}
//! Share ownership of shared_ptr //! Share ownership of shared_ptr
template<class T, class S> template<class T, class S>
std::shared_ptr<T> wrap_own_share(std::shared_ptr<S> t) std::shared_ptr<T> wrap_own_share(std::shared_ptr<S> t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment