Assignment operators
Declared in <bslstl_sharedptr.h>
Copy-assign from a compatible shared_ptr rhs.
shared_ptr&
operator=(shared_ptr const& rhs) noexcept;
» more...
Assign from a compatible shared_ptr rhs.
template<class COMPATIBLE_TYPE>
shared_ptr&
operator=(shared_ptr<COMPATIBLE_TYPE> const& rhs) noexcept
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;
» more...
Assign from a compatible shared_ptr rhs.
template<class COMPATIBLE_TYPE>
shared_ptr&
operator=(shared_ptr<COMPATIBLE_TYPE>&& rhs) noexcept
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;
» more...
Move-assign from a compatible shared_ptr rhs.
shared_ptr&
operator=(BloombergLP::bslmf::MovableRef<shared_ptr> rhs) noexcept;
» more...
Assign from a managed pointer, taking ownership of rhs.
template<class COMPATIBLE_TYPE>
shared_ptr&
operator=(BloombergLP::bslma::ManagedPtr<COMPATIBLE_TYPE> rhs)
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;
» more...
Assign from an auto pointer, taking ownership of rhs.
template<class COMPATIBLE_TYPE>
shared_ptr&
operator=(std::auto_ptr<COMPATIBLE_TYPE> rhs)
requires is_convertible<COMPATIBLE_TYPE *, ELEMENT_TYPE *>::value;
» more...
Assign from a unique pointer, taking ownership of rhs.
template<
class COMPATIBLE_TYPE,
class UNIQUE_DELETER>
shared_ptr&
operator=(std::unique_ptr<COMPATIBLE_TYPE, UNIQUE_DELETER>&& rhs)
requires is_convertible<
typename std::unique_ptr<COMPATIBLE_TYPE, UNIQUE_DELETER>::pointer,
ELEMENT_TYPE *>::value;
» more...
reference providing modifiable access to this shared pointer
| Name | Description |
|---|---|
| rhs | right-hand side operand |