bsl::allocator_traits<allocator<TYPE>>::allocate

allocate overloads

Synopses

Declared in <bslma_bslallocator.h>

Allocate storage for n objects using the specified m allocator.

static
pointer
allocate(
    allocator_type& m,
    size_type n);
» more...

Allocate storage for n objects, optionally using hint.

static
pointer
allocate(
    allocator_type& m,
    size_type n,
    const_void_pointer hint);
» more...

Return Value

pointer to the allocated storage

Parameters

NameDescription
mallocator that performs the allocation
nnumber of objects to allocate storage for
hintoptional locality hint (ignored)