bsl::shared_ptr::shared_ptr

Copy-construct a shared_ptr from original.

Synopsis

Declared in <bslstl_sharedptr.h>

shared_ptr(shared_ptr const& original) noexcept;

Description

Create a shared pointer that refers to and manages the same object (if any) as the specified original shared pointer, and uses the same deleter as original to destroy the shared 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