-
#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-
SharedElementPointerto aSharedElementPointerthat shares ownership of the specifiedownedpointer, in the same way as thestd::shared_ptraliasing constructor.The caller is responsible for ensuring that the returned
SharedElementPointeris not used after the element data to which it points becomes invalid.