[#bsl-weak_ptr-0d-operator_assign-09]
= xref:bsl.adoc[bsl]::xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]::operator&equals;
:relfileprefix: ../../
:mrdocs:

Assignment operators

== Synopses

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

Assign to this `weak&lowbar;ptr` from the specified arguments&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]&
xref:bsl/weak_ptr-0d/operator_assign-0d03.adoc[operator&equals;](xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr] const& rhs) noexcept;
----

[.small]#xref:bsl/weak_ptr-0d/operator_assign-0d03.adoc[_» more&period;&period;&period;_]#

Assign from a compatible shared or weak pointer `rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class COMPATIBLE&lowbar;TYPE&gt;
xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]&
xref:bsl/weak_ptr-0d/operator_assign-03.adoc[operator&equals;](xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr&lt;COMPATIBLE&lowbar;TYPE&gt;] const& rhs) noexcept
requires is&lowbar;convertible&lt;COMPATIBLE&lowbar;TYPE &ast;, ELEMENT&lowbar;TYPE &ast;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/weak_ptr-0d/operator_assign-03.adoc[_» more&period;&period;&period;_]#

Assign to this `weak&lowbar;ptr` from the specified arguments&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class COMPATIBLE&lowbar;TYPE&gt;
xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]&
xref:bsl/weak_ptr-0d/operator_assign-08.adoc[operator&equals;](xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr&lt;COMPATIBLE&lowbar;TYPE&gt;]&& rhs) noexcept
requires is&lowbar;convertible&lt;COMPATIBLE&lowbar;TYPE &ast;, ELEMENT&lowbar;TYPE &ast;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/weak_ptr-0d/operator_assign-08.adoc[_» more&period;&period;&period;_]#

Assign to this `weak&lowbar;ptr` from the specified arguments&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]&
xref:bsl/weak_ptr-0d/operator_assign-0d07.adoc[operator&equals;](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;weak&lowbar;ptr&gt;] rhs) noexcept;
----

[.small]#xref:bsl/weak_ptr-0d/operator_assign-0d07.adoc[_» more&period;&period;&period;_]#

Assign from a compatible shared pointer `rhs`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class COMPATIBLE&lowbar;TYPE&gt;
xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]&
xref:bsl/weak_ptr-0d/operator_assign-02.adoc[operator&equals;](xref:bsl/shared_ptr-0a.adoc[shared&lowbar;ptr&lt;COMPATIBLE&lowbar;TYPE&gt;] const& rhs) noexcept
requires is&lowbar;convertible&lt;COMPATIBLE&lowbar;TYPE &ast;, ELEMENT&lowbar;TYPE &ast;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/weak_ptr-0d/operator_assign-02.adoc[_» more&period;&period;&period;_]#

== Return Value

reference providing modifiable access to this weak pointer

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rhs*
| right&hyphen;hand side operand
|===


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