newObject overloads

Synopses

Declared in <bslma_allocatorutil.h>

Allocate and default‐construct a t_TYPE object.

template<
    class t_TYPE,
    class t_ALLOCATOR>
static
AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
newObject(t_ALLOCATOR const& allocator);

Allocate and construct a t_TYPE object from the given arguments.

template<
    class t_TYPE,
    class t_ALLOCATOR,
    class t_ARG1,
    class... t_ARGS>
static
AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer
newObject(
    t_ALLOCATOR const& allocator,
    t_ARG1&& argument1,
    t_ARGS&&... arguments);

Return Value

  • pointer to the newly allocated and default‐constructed t_TYPE object

  • pointer to the newly allocated and constructed t_TYPE object

Parameters

Name

Description

allocator

allocator from which to allocate and possibly pass to the constructor

argument1

first constructor argument

arguments

remaining constructor arguments

Created with MrDocs