[#bsl-shared_ptr-0a-2constructor-01] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::shared_ptr :relfileprefix: ../../ :mrdocs: Create a shared pointer that takes over the management of the modifiable object of (template parameter) type `COMPATIBLE_TYPE` previously managed by the auto pointer object that the specified `autoRef` refers to; this shared pointer refers to the same object that it manages, and `delete(get())` will be called to destroy the shared object when all references have been released. Optionally specify a `basicAllocator` used to allocate and deallocate the internal representation of the shared pointer. If `basicAllocator` is 0, the currently installed default allocator is used. This function does not exist unless `COMPATIBLE_TYPE *` is convertible to `ELEMENT_TYPE *`. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit shared_ptr( std::auto_ptr_ref<ELEMENT_TYPE> autoRef, xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#