[#BloombergLP-bslalg-ContainerBase]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::ContainerBase
:relfileprefix: ../../
:mrdocs:

Allocator proxy class for STL&hyphen;style containers&period; Provides access to the allocator&period; Implements the entire STL allocator interface, redirecting allocation and deallocation calls to the proxied allocator&period; One of two possible base classes is chosen depending on whether `ALLOCATOR` is an empty class&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;containerbase&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
class ContainerBase
    : public bsl::conditional&lt;bsl&colon;&colon;is&lowbar;empty&lt;ALLOCATOR&gt;&colon;&colon;value, ContainerBase&lowbar;EmptyBase&lt;ALLOCATOR&gt;, ContainerBase&lowbar;NonEmptyBase&lt;ALLOCATOR&gt;&gt;::type
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `bsl::conditional&lt;bsl&colon;&colon;is&lowbar;empty&lt;ALLOCATOR&gt;&colon;&colon;value, ContainerBase&lowbar;EmptyBase&lt;ALLOCATOR&gt;, ContainerBase&lowbar;NonEmptyBase&lt;ALLOCATOR&gt;&gt;::type`
| 
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ContainerBase/AllocatorType.adoc[`AllocatorType`] 
| Alias for the (template parameter) `ALLOCATOR` type&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ContainerBase/2constructor.adoc[`ContainerBase`]         [.small]#[constructor]#
| Construct this object using the specified `basicAllocator` of the parameterized `ALLOCATOR` type&period;
| xref:BloombergLP/bslalg/ContainerBase/2destructor.adoc[`&#126;ContainerBase`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bslalg/ContainerBase/equalAllocator.adoc[`equalAllocator`] 
| Returns true if this object and `rhs` have allocators that compare equal&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:bsl/_STLP_alloc_proxy.adoc[`&lowbar;STLP&lowbar;alloc&lowbar;proxy`] 
| Proxy combining an allocator with a stored value for STLPort containers&period;
|===


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