bsl::allocator::allocator

Convert a bslma::Allocator pointer to an allocator object.

Synopsis

Declared in <bslma_bslallocator.h>

allocator(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

NameDescription
mechanismallocator mechanism to use; if 0, use the default