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>
template<class CONVERTIBLE_TYPE>
explicit
shared_ptr(
std::auto_ptr<CONVERTIBLE_TYPE>& autoPtr,
BloombergLP::bslma::Allocator* basicAllocator = 0);
Created with MrDocs