[#bsl-function-0a-2constructor-03bb]
= xref:bsl.adoc[bsl]::xref:bsl/function-0a.adoc[function]::function
:relfileprefix: ../../
:mrdocs:

Create a `function` having the same value as (i&period;e&period;, wrapping a copy of the target held by) the specified `original` object&period; Use the specified `allocator` (e&period;g&period;, the address of a `bslma&colon;&colon;Allocator` object) to supply memory&period; If `allocator &equals;&equals; original&period;allocator()`, this object is created as if by move construction&semi; otherwise it is created as if by extended copy construction using `allocator`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
function(
    std::allocator&lowbar;arg&lowbar;t,
    xref:bsl/function-0a/allocator_type.adoc[allocator&lowbar;type] const& allocator,
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;function&gt;] original);
----


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