[#bsl-allocator-0a-2constructor-0157] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0a.adoc[allocator<void>]::allocator :relfileprefix: ../../ :mrdocs: Convert a `bslma::Allocator` pointer to an `allocator` object. == Synopsis Declared in `<bslma_bslallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- allocator(xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* mechanism); ---- == Description Convert a `bslma::Allocator` pointer to an `allocator` object that forwards allocation calls to the object pointed to by the specified `mechanism`. If `mechanism` is 0, then the currently installed default allocator is used instead. Postcondition: ` this‐>mechanism() == bslma::Default::allocator(mechanism); ` == Parameters [cols="1,4"] |=== | Name| Description | *mechanism* | allocator mechanism to use; if 0, use the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#