fmap_shared_ptr_aliasing overloads
Declared in <folly/Memory.h>
Deleted overload of fmap_shared_ptr_aliasing rejecting a null owner.
template<typename GetU>
auto
fmap_shared_ptr_aliasing(
std::nullptr_t owner,
GetU&& getU) = delete;
» more...
fmap_shared_ptr_aliasing
template<
typename T,
typename GetU,
typename U = std::remove_pointer_t<std::invoke_result_t<GetU&, T const*>>>
std::shared_ptr<U>
fmap_shared_ptr_aliasing(
std::shared_ptr<T> const& owner,
GetU getU);
» more...
Overload of fmap_shared_ptr_aliasing that moves from owner.
template<
typename T,
typename GetU,
typename U = std::remove_pointer_t<std::invoke_result_t<GetU&, T const*>>>
std::shared_ptr<U>
fmap_shared_ptr_aliasing(
std::shared_ptr<T>&& owner,
GetU getU);
» more...
owner or getU yields nullptr.| Name | Description |
|---|---|
| owner | the shared_ptr that owns the object of type T |
| getU | a function that returns a const pointer to the field of type U by taking a const T* as an argument. |