reset overloads

Synopses

Declared in <bslstl_sharedptr.h>

Reset this shared_ptr to the empty state.

void
reset() noexcept;

Reset this shared_ptr from the specified arguments.

template<class COMPATIBLE_TYPE>
void
reset(COMPATIBLE_TYPE* ptr)
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;

Reset this shared_ptr as an alias sharing ownership with source.

template<class ANY_TYPE>
void
reset(
    shared_ptr<ANY_TYPE> const& source,
    ELEMENT_TYPE* ptr);

Reset this shared_ptr to manage ptr with the specified deleter.

template<
    class COMPATIBLE_TYPE,
    class DELETER>
void
reset(
    COMPATIBLE_TYPE* ptr,
    DELETER deleter)
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;

Reset this shared_ptr to manage ptr with a deleter and allocator.

template<
    class COMPATIBLE_TYPE,
    class DELETER,
    class ALLOCATOR>
void
reset(
    COMPATIBLE_TYPE* ptr,
    DELETER deleter,
    ALLOCATOR basicAllocator)
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;

Parameters

Name

Description

ptr

pointer to the object to manage or refer to

source

source shared pointer that supplies ownership

deleter

deleter invoked when the last shared reference is released

basicAllocator

allocator used to supply memory

Created with MrDocs