[#BloombergLP-bslalg-ContainerBase_EmptyBase]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::ContainerBase&lowbar;EmptyBase
:relfileprefix: ../../
:mrdocs:

One of two possible base classes for `ContainerBase`&period; This class is for stateless allocators (i&period;e&period;, that have size 0), including `std&colon;&colon;allocator` (but not `bsl&colon;&colon;allocator`)&period; Provides access to the allocator&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&lowbar;EmptyBase;
----

== Description

This class does *not* have a subobject of type `ALLOCATOR`&period; Instead, a (zero&hyphen;sized) `ALLOCATOR` is implicitly sited at the address of the start of an object of this class&period; This approach was chosen in preference to inheriting from `ALLOCATOR` so as to avoid inheriting the interface for `ALLOCATOR` and thus making this class (and all classes derived from it) improperly categorized as an allocator when using the `bslma&colon;&colon;IsStdAllocator` metafunction&period; `ContainerBase&lowbar;EmptyBase` is an empty class and will not increase the footprint of a derived class&period;

== Type Aliases

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


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ContainerBase_EmptyBase/2constructor.adoc[`ContainerBase&lowbar;EmptyBase`]         [.small]#[constructor]#
| Construct this object to hold a copy of the specified `basicAllocator` of the parameterized `ALLOCATOR` type&period;
| xref:BloombergLP/bslalg/ContainerBase_EmptyBase/2destructor.adoc[`&#126;ContainerBase&lowbar;EmptyBase`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bslalg/ContainerBase_EmptyBase/allocatorRef-0b.adoc[`allocatorRef`] 
| `allocatorRef` overloads
|===



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