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

Create a `function` having the same target as the specified `original` object&period; Use `original&period;get&lowbar;allocator()` as the allocator to supply memory&period; The `original` object is set to empty after the new object is created&period; If the target qualifies for the small&hyphen;object optimization (see class&hyphen;level documentation), then it is move&hyphen;constructed into the new object&semi; otherwise ownership of the target is transferred without using the target&apos;s move constructor&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
function(xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;function&gt;] original) noexcept;
----


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