BloombergLP::bslma::AllocatorUtil::newObject

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);
» more...

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);
» more...

Return Value

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

Parameters

NameDescription
allocatorallocator from which to allocate and possibly pass to the constructor
argument1first constructor argument
argumentsremaining constructor arguments