[#bsl-allocator-0a-2constructor-0c] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0a.adoc[allocator<void>]::allocator :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<bslma_bslallocator.h>` Create an allocator that uses the default allocator mechanism. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/allocator-0a/2constructor-04.adoc[allocator](); ---- [.small]#xref:bsl/allocator-0a/2constructor-04.adoc[_» more..._]# Create an allocator that copies `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr xref:bsl/allocator-0a/2constructor-017.adoc[allocator](xref:bsl/allocator-0a.adoc[allocator<void>] const& original) noexcept = default; ---- [.small]#xref:bsl/allocator-0a/2constructor-017.adoc[_» more..._]# Convert a `bslma::Allocator` pointer to an `allocator` object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/allocator-0a/2constructor-0157.adoc[allocator](xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* mechanism); ---- [.small]#xref:bsl/allocator-0a/2constructor-0157.adoc[_» more..._]# Create an allocator sharing the mechanism of the specified `original`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ANY_TYPE> xref:bsl/allocator-0a/2constructor-0154.adoc[allocator](xref:bsl/allocator-0df.adoc[allocator<ANY_TYPE>] const& original) noexcept; ---- [.small]#xref:bsl/allocator-0a/2constructor-0154.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *original* | allocator whose mechanism is shared | *mechanism* | allocator mechanism to use; if 0, use the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#