[#bsl-allocator-0ac-2constructor-0c]
= xref:bsl.adoc[bsl]::xref:bsl/allocator-0ac.adoc[allocator&lt;void&gt;]::allocator
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bslma&lowbar;bslallocator&period;h&gt;`

Create a proxy object that will forward allocation calls to the object pointed to by `bslma&colon;&colon;Default&colon;&colon;defaultAllocator()`&period; Postcondition&colon; &grave; this&hyphen;&gt;mechanism() &equals;&equals; bslma&colon;&colon;Default&colon;&colon;defaultAllocator()&semi; &grave;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/allocator-0ac/2constructor-04.adoc[allocator]();
----

[.small]#xref:bsl/allocator-0ac/2constructor-04.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:bsl/allocator-0ac/2constructor-017.adoc[allocator](xref:bsl/allocator-0ac.adoc[allocator&lt;void&gt;] const& original) noexcept = default;
----

[.small]#xref:bsl/allocator-0ac/2constructor-017.adoc[_» more&period;&period;&period;_]#

Convert a `bslma&colon;&colon;Allocator` pointer to an `allocator` object that forwards allocation calls to the object pointed to by the specified `mechanism`&period; If `mechanism` is 0, then the currently installed default allocator is used instead&period; Postcondition&colon; &grave; this&hyphen;&gt;mechanism() &equals;&equals; bslma&colon;&colon;Default&colon;&colon;allocator(mechanism)&semi; &grave;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/allocator-0ac/2constructor-0157.adoc[allocator](xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* mechanism);
----

[.small]#xref:bsl/allocator-0ac/2constructor-0157.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ANY&lowbar;TYPE&gt;
xref:bsl/allocator-0ac/2constructor-0154.adoc[allocator](xref:bsl/allocator-0df.adoc[allocator&lt;ANY&lowbar;TYPE&gt;] const& original) noexcept;
----

[.small]#xref:bsl/allocator-0ac/2constructor-0154.adoc[_» more&period;&period;&period;_]#


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