Return from adapted for initializing another AA object.

Synopsis

Declared in <bslma_allocatorutil.h>

template<class t_ALLOC>
static
t_ALLOC
adapt(t_ALLOC const& from)
requires ! IsDerivedFromBslAllocator<t_ALLOC>::value;

Description

Return the specified from allocator adapted to a type most likely to be usable for initializing another AA object. Specifically, return from.mechanism() if from is a specialization of bsl::allocator (or a class derived from bsl::allocator); otherwise return from unchanged.

Return Value

from unchanged

Parameters

Name

Description

from

allocator to adapt

Created with MrDocs