[#BloombergLP-bslma-AllocatorUtil-newObject-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/AllocatorUtil.adoc[AllocatorUtil]::newObject
:relfileprefix: ../../../
:mrdocs:

`newObject` overloads

== Synopses

Declared in `&lt;bslma&lowbar;allocatorutil&period;h&gt;`

Allocate and default&hyphen;construct a `t&lowbar;TYPE` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    class t&lowbar;ALLOCATOR&gt;
static
AllocatorUtil&lowbar;Traits&lt;t&lowbar;ALLOCATOR, t&lowbar;TYPE&gt;::pointer
xref:BloombergLP/bslma/AllocatorUtil/newObject-09.adoc[newObject](t&lowbar;ALLOCATOR const& allocator);
----

[.small]#xref:BloombergLP/bslma/AllocatorUtil/newObject-09.adoc[_» more&period;&period;&period;_]#

Allocate and construct a `t&lowbar;TYPE` object from the given arguments&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    class t&lowbar;ALLOCATOR,
    class t&lowbar;ARG1,
    class&period;&period;&period; t&lowbar;ARGS&gt;
static
AllocatorUtil&lowbar;Traits&lt;t&lowbar;ALLOCATOR, t&lowbar;TYPE&gt;::pointer
xref:BloombergLP/bslma/AllocatorUtil/newObject-07.adoc[newObject](
    t&lowbar;ALLOCATOR const& allocator,
    t&lowbar;ARG1&& argument1,
    t&lowbar;ARGS&&&period;&period;&period; arguments);
----

[.small]#xref:BloombergLP/bslma/AllocatorUtil/newObject-07.adoc[_» more&period;&period;&period;_]#

== Return Value

* pointer to the newly allocated and default&hyphen;constructed `t&lowbar;TYPE` object
* pointer to the newly allocated and constructed `t&lowbar;TYPE` object

== Parameters

[cols="1,4"]
|===
| Name| Description
| *allocator*
| allocator from which to allocate and possibly pass to the constructor
| *argument1*
| first constructor argument
| *arguments*
| remaining constructor arguments
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
