[#bsl-shared_ptr-0a-2constructor-0e] = 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 previously managed by the specified `autoPtr` to the (template parameter) type `CONVERTIBLE_TYPE`, and that refers to `(ELEMENT_TYPE *)autoPtr.get()`. `delete(autoPtr.release())` 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. If `CONVERTIBLE_TYPE *` is not implicitly convertible to `ELEMENT_TYPE *`, then a compiler diagnostic will be emitted indicating the error. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class CONVERTIBLE_TYPE> explicit shared_ptr( std::auto_ptr<CONVERTIBLE_TYPE>& autoPtr, xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#