Provide a facade allocator that propagates adapted allocator state.

Synopsis

Declared in <bsltf_stdallocatoradaptor.h>

template<class ALLOCATOR>
class StdAllocatorAdaptor
    : public ALLOCATOR

Description

This class template provides the facade of an allocator but mostly delegates operations to the allocator object (of template parameter type) it adapts, except that it enables the propagation of the (stateful) allocator object to constructed elements, if appropriate.

Base Classes

Name

Description

ALLOCATOR

Types

Name

Description

rebind

Provide a namespace for a rebound allocator adaptor type.

Type Aliases

Name

Description

const_pointer

Alias for ALLOCATOR::const_pointer.

const_reference

Alias for ALLOCATOR::const_reference.

difference_type

Alias for ALLOCATOR::difference_type.

pointer

Alias for ALLOCATOR::pointer.

reference

Alias for ALLOCATOR::reference.

size_type

Alias for ALLOCATOR::size_type.

value_type

Alias for ALLOCATOR::value_type.

Member Functions

Name

Description

StdAllocatorAdaptor [constructor]

Create a standard allocator adaptor object for a default‐constructed allocator object of the (template parameter) type ALLOCATOR.

StdAllocatorAdaptor [constructor]

Create a copy of the specified original allocator adaptor.

StdAllocatorAdaptor [constructor]

Create a copy of the specified other allocator adaptor.

StdAllocatorAdaptor [constructor]

Create a standard allocator adaptor object from the null pointer constant.

StdAllocatorAdaptor [constructor]

Create a standard allocator adaptor object for the specified allocator of the (template parameter) type ALLOCATOR.

operator=

Assign to this object the value of the specified original object, and return a reference providing modifiable access to this object.

allocator

Return a reference to the non‐modifiable allocator instance associated with this standard allocator adaptor.

construct

Construct an object of ELEMENT_TYPE at the specified address.

select_on_container_copy_construction

Return an adaptor for the allocator selected on container copy.

operator BloombergLP::bslmf::NestedTraitDeclaration<StdAllocatorAdaptor, IsStdAllocator>

Declare StdAllocatorAdaptor as a standard allocator.

Non-Member Functions

Name

Description

operator!=

Return whether two allocator adaptors do not compare equal.

operator==

Return whether two allocator adaptors compare equal.

Created with MrDocs