bsl::weak_ptr::lock

Return a shared pointer to the object referred to by this weak pointer if false == expired(), and a shared pointer in the empty state otherwise.

Synopsis

Declared in <bslstl_sharedptr.h>

shared_ptr<ELEMENT_TYPE>
lock() const noexcept;