Move‐construct a weak_ptr from a compatible other.

Synopsis

Declared in <bslstl_sharedptr.h>

template<class COMPATIBLE_TYPE>
weak_ptr(weak_ptr<COMPATIBLE_TYPE>&& other) noexcept;

Description

Create a weak pointer that refers to the same object (if any) as the specified other weak pointer, and reset other to an empty state. Note that this operation does not involve any change to reference counts.

Parameters

Name

Description

other

compatible weak pointer to move from

Created with MrDocs