[#bsl-make_shared-09] = xref:bsl.adoc[bsl]::make_shared :relfileprefix: ../ :mrdocs: `make_shared` 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 default allocator 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 each element in the array is default constructed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ARRAY_TYPE> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/make_shared-0a.adoc[make_shared]() requires is_bounded_array<ARRAY_TYPE>::value; ---- [.small]#xref:bsl/make_shared-0a.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a unbounded array. The default allocator 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 each element in the array is default constructed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ARRAY_TYPE> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/make_shared-0e.adoc[make_shared](std::size_t numElements) requires is_unbounded_array<ARRAY_TYPE>::value; ---- [.small]#xref:bsl/make_shared-0e.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a bounded array. The default allocator 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 each element in the array is constructed from the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ARRAY_TYPE> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/make_shared-06.adoc[make_shared](remove_extent<ARRAY_TYPE>::type const& value) requires is_bounded_array<ARRAY_TYPE>::value; ---- [.small]#xref:bsl/make_shared-06.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ELEMENT_TYPE` object. The default allocator 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 initialized using the `ELEMENT_TYPE` constructor that takes the specified arguments `std::forward<ARGS>(args)...`. If `ELEMENT_TYPE` uses `bslma` allocators, then the default allocator is passed as an extra argument in the final position. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ELEMENT_TYPE, class... ARGS> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ELEMENT_TYPE>] xref:bsl/make_shared-02.adoc[make_shared](ARGS&&... args) requires !bsl::is_array<ELEMENT_TYPE>::value; ---- [.small]#xref:bsl/make_shared-02.adoc[_» more..._]# Return a `shared_ptr` object referring to and managing a new `ARRAY_TYPE` object, where `ARRAY_TYPE` is a unbounded array. The default allocator 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 each element in the array is constructed from the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ARRAY_TYPE> xref:bsl/shared_ptr-0a.adoc[bsl::shared_ptr<ARRAY_TYPE>] xref:bsl/make_shared-0d.adoc[make_shared]( std::size_t numElements, remove_extent<ARRAY_TYPE>::type const& value) requires is_unbounded_array<ARRAY_TYPE>::value; ---- [.small]#xref:bsl/make_shared-0d.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#