[#BloombergLP-bslma-ConstructionUtil_AllocAdaptorUtil-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::ConstructionUtil&lowbar;AllocAdaptorUtil
:relfileprefix: ../../
:mrdocs:

Component&hyphen;private utility for adapting allocator objects (see specializations)&period;

== Synopsis

Declared in `&lt;bslma&lowbar;constructionutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TYPE,
    bool HAS&lowbar;ALLOC&lowbar;TYPE = HasAllocatorType&lt;TYPE&gt;&colon;&colon;value,
    bool IS&lowbar;BSLMA&lowbar;AA = UsesBslmaAllocator&lt;TYPE&gt;&colon;&colon;value&gt;
struct ConstructionUtil&lowbar;AllocAdaptorUtil;
----

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/ConstructionUtil_AllocAdaptorUtil-0a.adoc[`ConstructionUtil&lowbar;AllocAdaptorUtil&lt;TYPE, false, false&gt;`] 
| This utility class template provides a static `adapt` method that adapts an allocator object to the type expected by `TYPE`&period; This primary template is instantiated only for a non&hyphen;AA `TYPE`&semi; such types do not expect an allocator, so no `adapt` method is defined&period;
| xref:BloombergLP/bslma/ConstructionUtil_AllocAdaptorUtil-0b.adoc[`ConstructionUtil&lowbar;AllocAdaptorUtil&lt;TYPE, false, true&gt;`] 
| This utility class template provides a static `adapt` method that adapts an allocator object to the type expected by `TYPE`&period; This partial specialization is instantiated for types that expect an allocator of type `bslma&colon;&colon;Allocator &ast;`&period;
| xref:BloombergLP/bslma/ConstructionUtil_AllocAdaptorUtil-05.adoc[`ConstructionUtil&lowbar;AllocAdaptorUtil&lt;TYPE, true, IS&lowbar;BSLMA&lowbar;AA&gt;`] 
| This utility class template provides a static `adapt` method that adapts an allocator object to the type expected by `TYPE`&period; This partial specialization is instantiated for types that expect an allocator of type `TYPE&colon;&colon;allocator&lowbar;type`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
