[#bsl-weak_ptr-0d-operator_assign-09] = xref:bsl.adoc[bsl]::xref:bsl/weak_ptr-0d.adoc[weak_ptr]::operator= :relfileprefix: ../../ :mrdocs: Assignment operators == Synopses Declared in `<bslstl_sharedptr.h>` Assign to this `weak_ptr` from the specified arguments. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/weak_ptr-0d.adoc[weak_ptr]& xref:bsl/weak_ptr-0d/operator_assign-0d03.adoc[operator=](xref:bsl/weak_ptr-0d.adoc[weak_ptr] const& rhs) noexcept; ---- [.small]#xref:bsl/weak_ptr-0d/operator_assign-0d03.adoc[_» more..._]# Assign from a compatible shared or weak pointer `rhs`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPATIBLE_TYPE> xref:bsl/weak_ptr-0d.adoc[weak_ptr]& xref:bsl/weak_ptr-0d/operator_assign-03.adoc[operator=](xref:bsl/weak_ptr-0d.adoc[weak_ptr<COMPATIBLE_TYPE>] const& rhs) noexcept requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value; ---- [.small]#xref:bsl/weak_ptr-0d/operator_assign-03.adoc[_» more..._]# Assign to this `weak_ptr` from the specified arguments. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPATIBLE_TYPE> xref:bsl/weak_ptr-0d.adoc[weak_ptr]& xref:bsl/weak_ptr-0d/operator_assign-08.adoc[operator=](xref:bsl/weak_ptr-0d.adoc[weak_ptr<COMPATIBLE_TYPE>]&& rhs) noexcept requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value; ---- [.small]#xref:bsl/weak_ptr-0d/operator_assign-08.adoc[_» more..._]# Assign to this `weak_ptr` from the specified arguments. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/weak_ptr-0d.adoc[weak_ptr]& xref:bsl/weak_ptr-0d/operator_assign-0d07.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<weak_ptr>] rhs) noexcept; ---- [.small]#xref:bsl/weak_ptr-0d/operator_assign-0d07.adoc[_» more..._]# Assign from a compatible shared pointer `rhs`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class COMPATIBLE_TYPE> xref:bsl/weak_ptr-0d.adoc[weak_ptr]& xref:bsl/weak_ptr-0d/operator_assign-02.adoc[operator=](xref:bsl/shared_ptr-0a.adoc[shared_ptr<COMPATIBLE_TYPE>] const& rhs) noexcept requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value; ---- [.small]#xref:bsl/weak_ptr-0d/operator_assign-02.adoc[_» more..._]# == Return Value reference providing modifiable access to this weak pointer == Parameters [cols="1,4"] |=== | Name| Description | *rhs* | right‐hand side operand |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#