[#bsl-allocate_shared_for_overwrite-05] = xref:bsl.adoc[bsl]::allocate_shared_for_overwrite :relfileprefix: ../ :mrdocs: `allocate_shared_for_overwrite` overloads == Synopses Declared in `<bslstl_sharedptr.h>` Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a bounded array. The specified `basicAllocator` will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new `ARRAY_TYPE` object, and the array is default‐constructed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ARRAY_TYPE, class ALLOC> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/allocate_shared_for_overwrite-0d.adoc[allocate_shared_for_overwrite](ALLOC basicAllocator) requires is_bounded_array<ARRAY_TYPE>::value && !is_pointer<ALLOC>::value; ---- [.small]#xref:bsl/allocate_shared_for_overwrite-0d.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ELEMENT_TYPE` object. The specified `basicAllocator` will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new `ELEMENT_TYPE` object, which is default‐constructed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ELEMENT_TYPE, class ALLOC> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ELEMENT_TYPE>] xref:bsl/allocate_shared_for_overwrite-07.adoc[allocate_shared_for_overwrite](ALLOC basicAllocator) requires !is_array<ELEMENT_TYPE>::value && !is_pointer<ALLOC>::value; ---- [.small]#xref:bsl/allocate_shared_for_overwrite-07.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a bounded array. The specified `basicAllocator` will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new `ARRAY_TYPE` object, and the array is default‐constructed. If `basicAllocator` is 0, then the default allocator will be used instead. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ARRAY_TYPE, class ALLOC> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/allocate_shared_for_overwrite-017.adoc[allocate_shared_for_overwrite](ALLOC* basicAllocator) requires is_bounded_array<ARRAY_TYPE>::value; ---- [.small]#xref:bsl/allocate_shared_for_overwrite-017.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ELEMENT_TYPE` object. The specified `basicAllocator` will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new `ELEMENT_TYPE` object, which is default‐constructed. If `basicAllocator` is 0, then the default allocator will be used instead. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ELEMENT_TYPE, class ALLOC> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ELEMENT_TYPE>] xref:bsl/allocate_shared_for_overwrite-01c.adoc[allocate_shared_for_overwrite](ALLOC* basicAllocator) requires !is_array<ELEMENT_TYPE>::value; ---- [.small]#xref:bsl/allocate_shared_for_overwrite-01c.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a unbounded array. The specified `basicAllocator` will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new `ARRAY_TYPE` containing the specified `numElements` number of elements, and the array is default‐constructed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ARRAY_TYPE, class ALLOC> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/allocate_shared_for_overwrite-0eed.adoc[allocate_shared_for_overwrite]( ALLOC basicAllocator, std::size_t numElements) requires is_unbounded_array<ARRAY_TYPE>::value && !is_pointer<ALLOC>::value; ---- [.small]#xref:bsl/allocate_shared_for_overwrite-0eed.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a unbounded array. The specified `basicAllocator` will be used to supply a single contiguous region of memory holding the returned shared pointer's internal representation and the new `ARRAY_TYPE` containing the specified `numElements` number of elements, and the array is default‐constructed. If `basicAllocator` is 0, then the default allocator will be used instead. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ARRAY_TYPE, class ALLOC> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/allocate_shared_for_overwrite-0ee2.adoc[allocate_shared_for_overwrite]( ALLOC* basicAllocator, std::size_t numElements) requires is_unbounded_array<ARRAY_TYPE>::value; ---- [.small]#xref:bsl/allocate_shared_for_overwrite-0ee2.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#