BloombergLP::bslalg::ContainerBase

Allocator proxy base class for STL-style containers.

Synopsis

Declared in <bslalg_containerbase.h>

template<class ALLOCATOR>
class ContainerBase
    : public bsl::conditional<bsl::is_empty<ALLOCATOR>::value, ContainerBase_EmptyBase<ALLOCATOR>, ContainerBase_NonEmptyBase<ALLOCATOR>>::type

Description

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

Base Classes

NameDescription
bsl::conditional<bsl::is_empty<ALLOCATOR>::value, ContainerBase_EmptyBase<ALLOCATOR>, ContainerBase_NonEmptyBase<ALLOCATOR>>::type

Type Aliases

NameDescription
AllocatorType Alias for the (template parameter) ALLOCATOR type.

Member Functions

NameDescription
ContainerBase [constructor]Construct this object using the specified basicAllocator of the parameterized ALLOCATOR type.
~ContainerBase [destructor]Destroy this object.
equalAllocator Return true if this object and the specified rhs have allocators that compare equal.

Derived Classes

NameDescription
_STLP_alloc_proxy Proxy combining an allocator with a stored value for STLPort containers.