Traits for an allocator expressed as a pointer to a memory resource.

Synopsis

Description

This specialization is for allocators expressed as a pointer to class derived from bsl::memory_resource. The base class will be bsl::allocator_traits<bsl::allocator<t_TYPE>> if t_MEMORY_RSRC is derived from bsl::Allocator; otherwise the base class will be bsl::allocator_traits<bsl::polymorphic_allocator<t_TYPE>>.

Base Classes

Type Aliases

Name

Description

allocator_type

This typedef is an alias to the (template parameter) ALLOCATOR_TYPE.

const_pointer

This typedef is an alias to AllocatorTraits_ConstPointerType<ALLOCATOR_TYPE>::type.

const_void_pointer

Const void pointer type for the allocator.

difference_type

This typedef is an alias to AllocatorTraits_DifferenceType<ALLOCATOR_TYPE>::type.

is_always_equal

true_type if two allocators always compare equal; else false_type.

pointer

This typedef is an alias to AllocatorTraits_PointerType<ALLOCATOR_TYPE>::type.

propagate_on_container_copy_assignment

true_type if the allocator propagates on copy assignment.

propagate_on_container_move_assignment

true_type if the allocator propagates on move assignment.

propagate_on_container_swap

true_type if the allocator propagates on container swap.

rebind_alloc

Rebind this allocator to the specified ELEMENT_TYPE.

rebind_traits

Rebind this allocator traits type to the specified ELEMENT_TYPE.

size_type

This typedef is an alias to AllocatorTraits_SizeType<ALLOCATOR_TYPE>::type.

value_type

This typedef is an alias to ALLOCATOR_TYPE::value_type.

void_pointer

This typedef is an alias to AllocatorTraits_VoidPointerType<ALLOCATOR_TYPE>::type.

Static Member Functions

Name

Description

allocate

allocate overloads

construct

Construct an ELEMENT_TYPE object at elementAddr.

deallocate

Deallocate the storage at elementAddr for n objects.

destroy

Destroy the ELEMENT_TYPE object at elementAddr.

max_size

Return the maximum number of objects allocate can return.

select_on_container_copy_construction

Return the allocator to use when copy‐constructing a container.

Created with MrDocs