bsl::allocator_traits::allocate

Allocate storage for n objects, optionally using hint.

Synopsis

Declared in <bslma_allocatortraits.h>

static
pointer
allocate(
    ALLOCATOR_TYPE& basicAllocator,
    size_type n,
    const_void_pointer hint);

Description

Return basicAllocator.allocate(n, hint).

Return Value

pointer to the allocated storage

Parameters

NameDescription
basicAllocatorallocator that performs the allocation
nnumber of objects to allocate storage for
hintoptional locality hint for the allocation