bsl::shared_ptr::shared_ptr

Move-construct a shared_ptr from original.

Synopsis

Declared in <bslstl_sharedptr.h>

shared_ptr(BloombergLP::bslmf::MovableRef<shared_ptr> original) noexcept;

Description

Create a shared pointer that refers to and assumes management of the same object (if any) as the specified original shared pointer, using the same deleter as original to destroy the shared object, and reset original to an empty state, not pointing to any object. Note that if original is empty, then an empty shared pointer is created, which may still point to an un-managed object if original were constructed through an aliasing constructor.

Parameters

NameDescription
originalsource object to copy or move from