[#bsl-shared_ptr-0a-2constructor-088] = xref:bsl.adoc[bsl]::xref:bsl/shared_ptr-0a.adoc[shared_ptr]::shared_ptr :relfileprefix: ../../ :mrdocs: Create a shared pointer that reference‐counts the null pointer, and calls the specified `deleter` with a null pointer (i.e., invokes `deleter((ELEMENT_TYPE *)0)`) when the last shared reference is destroyed. The specified `nullPointerLiteral` is not used. Optionally specify a `basicAllocator` to allocate and deallocate the internal representation of the shared pointer (including a copy of `deleter`). If `basicAllocator` is 0, the currently installed default allocator is used. If an exception is thrown when allocating storage for the internal representation, then `deleter((ELEMENT_TYPE *)0)` will be called. The behavior is undefined unless `deleter` can be called with a null pointer, and unless the constructor making a copy of `deleter` does not throw an exception. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class DELETER> shared_ptr( xref:bsl/nullptr_t-08.adoc[nullptr_t] nullPointerLiteral, DELETER deleter, xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator = 0); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#