template<class ALLOCATOR>
class bslalg::ContainerBase_EmptyBase< ALLOCATOR >
One of two possible base classes for ContainerBase
. This class is for stateless allocators (i.e., that have size 0), including std::allocator
(but not bsl::allocator
). Provides access to the allocator.
This class does not have a subobject of type ALLOCATOR
. Instead, a (zero-sized) ALLOCATOR
is implicitly sited at the address of the start of an object of this class. 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::IsStdAllocator
metafunction. ContainerBase_EmptyBase
is an empty class and will not increase the footprint of a derived class.
See bslalg_containerbase