Return the bslma::Allocator pointer held by a.

Synopsis

Declared in <bslma_constructionutil.h>

template<class ALLOC>
static
bslma::Allocator*
adapt(ALLOC const& a);

Description

Return the bslma::Allocator pointer held by the specified a object of non‐pointer class. Compilation will fail if type ALLOC does not provide a mechanism() accessor returning a pointer to type convertible to bslma::Allocator *.

Return Value

the bslma::Allocator pointer held by a

Parameters

Name

Description

a

allocator object providing a mechanism() accessor

Created with MrDocs