[#bsl-make_shared-09]
= xref:bsl.adoc[bsl]::make&lowbar;shared
:relfileprefix: ../
:mrdocs:

`make&lowbar;shared` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

Return a `shared&lowbar;ptr` object referring to and managing a new `ARRAY&lowbar;TYPE` object, where `ARRAY&lowbar;TYPE` is a bounded array&period; The default allocator will be used to supply a single contiguous region of memory holding the returned shared pointer&apos;s internal representation and the new `ARRAY&lowbar;TYPE` object, and each element in the array is default constructed&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ARRAY&lowbar;TYPE&gt;
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;ARRAY&lowbar;TYPE&gt;]
xref:bsl/make_shared-0a.adoc[make&lowbar;shared]()
requires is&lowbar;bounded&lowbar;array&lt;ARRAY&lowbar;TYPE&gt;&colon;&colon;value;
----

[.small]#xref:bsl/make_shared-0a.adoc[_» more&period;&period;&period;_]#

Return a `shared&lowbar;ptr` object referring to and managing a new `ARRAY&lowbar;TYPE` object, where `ARRAY&lowbar;TYPE` is a unbounded array&period; The default allocator will be used to supply a single contiguous region of memory holding the returned shared pointer&apos;s internal representation and the new `ARRAY&lowbar;TYPE` containing the specified `numElements` number of elements, and each element in the array is default constructed&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ARRAY&lowbar;TYPE&gt;
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;ARRAY&lowbar;TYPE&gt;]
xref:bsl/make_shared-0e.adoc[make&lowbar;shared](std::size&lowbar;t numElements)
requires is&lowbar;unbounded&lowbar;array&lt;ARRAY&lowbar;TYPE&gt;&colon;&colon;value;
----

[.small]#xref:bsl/make_shared-0e.adoc[_» more&period;&period;&period;_]#

Return a `shared&lowbar;ptr` object referring to and managing a new `ARRAY&lowbar;TYPE` object, where `ARRAY&lowbar;TYPE` is a bounded array&period; The default allocator will be used to supply a single contiguous region of memory holding the returned shared pointer&apos;s internal representation and the new `ARRAY&lowbar;TYPE` object, and each element in the array is constructed from the specified `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ARRAY&lowbar;TYPE&gt;
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;ARRAY&lowbar;TYPE&gt;]
xref:bsl/make_shared-06.adoc[make&lowbar;shared](remove&lowbar;extent&lt;ARRAY&lowbar;TYPE&gt;::type const& value)
requires is&lowbar;bounded&lowbar;array&lt;ARRAY&lowbar;TYPE&gt;&colon;&colon;value;
----

[.small]#xref:bsl/make_shared-06.adoc[_» more&period;&period;&period;_]#

Return a `shared&lowbar;ptr` object referring to and managing a new `ELEMENT&lowbar;TYPE` object&period; The default allocator will be used to supply a single contiguous region of memory holding the returned shared pointer&apos;s internal representation and the new `ELEMENT&lowbar;TYPE` object, which is initialized using the `ELEMENT&lowbar;TYPE` constructor that takes the specified arguments `std&colon;&colon;forward&lt;ARGS&gt;(args)&period;&period;&period;`&period; If `ELEMENT&lowbar;TYPE` uses `bslma` allocators, then the default allocator is passed as an extra argument in the final position&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class ELEMENT&lowbar;TYPE,
    class&period;&period;&period; ARGS&gt;
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;ELEMENT&lowbar;TYPE&gt;]
xref:bsl/make_shared-02.adoc[make&lowbar;shared](ARGS&&&period;&period;&period; args)
requires !bsl&colon;&colon;is&lowbar;array&lt;ELEMENT&lowbar;TYPE&gt;&colon;&colon;value;
----

[.small]#xref:bsl/make_shared-02.adoc[_» more&period;&period;&period;_]#

Return a `shared&lowbar;ptr` object referring to and managing a new `ARRAY&lowbar;TYPE` object, where `ARRAY&lowbar;TYPE` is a unbounded array&period; The default allocator will be used to supply a single contiguous region of memory holding the returned shared pointer&apos;s internal representation and the new `ARRAY&lowbar;TYPE` containing the specified `numElements` number of elements, and each element in the array is constructed from the specified `value`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ARRAY&lowbar;TYPE&gt;
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;ARRAY&lowbar;TYPE&gt;]
xref:bsl/make_shared-0d.adoc[make&lowbar;shared](
    std::size&lowbar;t numElements,
    remove&lowbar;extent&lt;ARRAY&lowbar;TYPE&gt;::type const& value)
requires is&lowbar;unbounded&lowbar;array&lt;ARRAY&lowbar;TYPE&gt;&colon;&colon;value;
----

[.small]#xref:bsl/make_shared-0d.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
