[#BloombergLP-bslma-AllocatorUtil-adapt-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/AllocatorUtil.adoc[AllocatorUtil]::adapt :relfileprefix: ../../../ :mrdocs: 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. == Synopsis Declared in `<bslma_allocatorutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ALLOC> static t_ALLOC adapt(t_ALLOC const& from) requires ! IsDerivedFromBslAllocator<t_ALLOC>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#