Create a shared pointer that manages a modifiable object of (template parameter) type CONVERTIBLE_TYPE and refers to the specified (ELEMENT_TYPE *)ptr. The currently installed default allocator is used to allocate and deallocate the internal representation of the shared pointer. When all references have been released, the object pointed to by the managed pointer will be destroyed by a call to delete ptr. If CONVERTIBLE_TYPE * is not implicitly convertible to ELEMENT_TYPE *, then a compiler diagnostic will be emitted indicating the error. If ptr is 0, then this shared pointer will still allocate an internal representation to share ownership of that empty state, which will be reclaimed when the last reference is destroyed. If an exception is thrown allocating storage for the representation, then delete ptr will be called. Note that if ptr is a null-pointer constant, the compiler will actually select the shared_ptr(bsl::nullptr_t) constructor, resulting in an empty shared pointer.
Declared in <bslstl_sharedptr.h>
template<class CONVERTIBLE_TYPE>
explicit
shared_ptr(CONVERTIBLE_TYPE* ptr);