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

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

== Synopsis

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

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

== Description

Make this weak pointer refer to the same object (if any) as the specified `rhs` weak pointer&period; Decrement the number of weak references to the object this weak pointer manages (if any), and increment the number of weak references to the object managed by `rhs` (if any)&period; Return a reference providing modifiable access to this weak pointer&period; Note that if `rhs` is in an empty state, this weak pointer will be set to an empty state&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]#
