[#bsl-shared_ptr-0a-reset-0c8]
= xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr]::reset
:relfileprefix: ../../
:mrdocs:

`reset` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

Reset this `shared&lowbar;ptr` to the empty state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/shared_ptr-0a/reset-0cc.adoc[reset]() noexcept;
----

[.small]#xref:bsl/shared_ptr-0a/reset-0cc.adoc[_» more&period;&period;&period;_]#

Reset this `shared&lowbar;ptr` from the specified arguments&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class COMPATIBLE&lowbar;TYPE&gt;
void
xref:bsl/shared_ptr-0a/reset-07.adoc[reset](COMPATIBLE&lowbar;TYPE* ptr)
requires is&lowbar;convertible&lt;COMPATIBLE&lowbar;TYPE &ast;, ELEMENT&lowbar;TYPE &ast;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/shared_ptr-0a/reset-07.adoc[_» more&period;&period;&period;_]#

Reset this `shared&lowbar;ptr` as an alias sharing ownership with `source`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ANY&lowbar;TYPE&gt;
void
xref:bsl/shared_ptr-0a/reset-04.adoc[reset](
    xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr&lt;ANY&lowbar;TYPE&gt;] const& source,
    ELEMENT&lowbar;TYPE* ptr);
----

[.small]#xref:bsl/shared_ptr-0a/reset-04.adoc[_» more&period;&period;&period;_]#

Reset this `shared&lowbar;ptr` to manage `ptr` with the specified `deleter`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class COMPATIBLE&lowbar;TYPE,
    class DELETER&gt;
void
xref:bsl/shared_ptr-0a/reset-0e.adoc[reset](
    COMPATIBLE&lowbar;TYPE* ptr,
    DELETER deleter)
requires is&lowbar;convertible&lt;COMPATIBLE&lowbar;TYPE &ast;, ELEMENT&lowbar;TYPE &ast;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/shared_ptr-0a/reset-0e.adoc[_» more&period;&period;&period;_]#

Reset this `shared&lowbar;ptr` to manage `ptr` with a deleter and allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class COMPATIBLE&lowbar;TYPE,
    class DELETER,
    class ALLOCATOR&gt;
void
xref:bsl/shared_ptr-0a/reset-06.adoc[reset](
    COMPATIBLE&lowbar;TYPE* ptr,
    DELETER deleter,
    ALLOCATOR basicAllocator)
requires is&lowbar;convertible&lt;COMPATIBLE&lowbar;TYPE &ast;, ELEMENT&lowbar;TYPE &ast;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/shared_ptr-0a/reset-06.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| 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
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
