folly::ReadMostlyWeakPtr::operator=

Assignment operators

Synopses

Declared in <folly/concurrency/memory/ReadMostlySharedPtr.h>

Copy-assigns a weak reference to the same object.

ReadMostlyWeakPtr&
operator=(ReadMostlyWeakPtr const& other);
» more...

Copy-assigns from a weak pointer to a convertible type.

template<typename T2>
requires detail::ptr_convertible<T2, T>
ReadMostlyWeakPtr&
operator=(ReadMostlyWeakPtr<T2, RefCount> const& other);
» more...

Move-assigns from another weak pointer by swapping state.

ReadMostlyWeakPtr&
operator=(ReadMostlyWeakPtr&& other) noexcept;
» more...

Move-assigns from a weak pointer to a convertible type.

template<typename T2>
requires detail::ptr_convertible<T2, T>
ReadMostlyWeakPtr&
operator=(ReadMostlyWeakPtr<T2, RefCount>&& other) noexcept;
» more...

Assigns a weak reference from a main pointer of a convertible type.

template<typename T2>
requires detail::ptr_convertible<T2, T>
ReadMostlyWeakPtr&
operator=(ReadMostlyMainPtr<T2, RefCount> const& mainPtr);
» more...

Assigns a weak reference from a shared pointer of a convertible type.

template<typename T2>
requires detail::ptr_convertible<T2, T>
ReadMostlyWeakPtr&
operator=(ReadMostlySharedPtr<T2, RefCount> const& mainPtr);
» more...

Return Value

A reference to this weak pointer.

Template Parameters

NameDescription
T2The source pointee type, convertible to T.

Parameters

NameDescription
otherThe weak pointer to copy.
mainPtrThe main pointer to reference.