[#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 `<bslma_allocatorutil.h>` Return an object of (template parameter) `t_TYPE` allocated from the specified `allocator` and constructed with no arguments except that, for scoped allocator types such as `bsl::allocator` and `bsl::polymorphic_allocator`, `allocator` may be passed to the `t_TYPE` constructor (i.e., if `t_TYPE` is AA). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_ALLOCATOR> static AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer xref:BloombergLP/bslma/AllocatorUtil/newObject-09.adoc[newObject](t_ALLOCATOR const& allocator); ---- [.small]#xref:BloombergLP/bslma/AllocatorUtil/newObject-09.adoc[_» more..._]# Return an object of (template parameter) `t_TYPE` allocated from the specified `allocator` and constructed from the specified `argument1` and other specified `arguments`. For scoped allocator types such as `bsl::allocator` and `bsl::polymorphic_allocator`, `allocator` may be passed to the `t_TYPE` constructor as an additional argument (i.e., if `t_TYPE` is AA). Note that, in C++03, perfect forwarding is limited such that any lvalue reference in the `arguments` parameter pack is const‐qualified when forwarded to the `TARGET_TYPE` constructor; only `argument1` can be forwarded as an unqualified lvalue. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_ALLOCATOR, class t_ARG1, class... t_ARGS> static AllocatorUtil_Traits<t_ALLOCATOR, t_TYPE>::pointer xref:BloombergLP/bslma/AllocatorUtil/newObject-07.adoc[newObject]( t_ALLOCATOR const& allocator, t_ARG1&& argument1, t_ARGS&&... arguments); ---- [.small]#xref:BloombergLP/bslma/AllocatorUtil/newObject-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#