bsl::allocator_traits::allocate

allocate overloads

Synopses

Declared in <bslma_allocatortraits.h>

Return basicAllocator.allocate(n).

static
pointer
allocate(
    ALLOCATOR_TYPE& basicAllocator,
    size_type n);
» more...

Allocate storage for n objects, optionally using hint.

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

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