#include "tensorstore/util/element_pointer.h"
template <typename T, typename Element>
  
requires (!IsShared<Element>)
ElementPointer<Shared<Element>>
tensorstore::UnownedToShared(const std::shared_ptr<T>owned,
                             
ElementPointer<Element> element_pointer);

Converts a non-Shared ElementPointer to a SharedElementPointer that shares ownership of the specified owned pointer, in the same way as the std::shared_ptr aliasing constructor.

The caller is responsible for ensuring that the returned SharedElementPointer is not used after the element data to which it points becomes invalid.