Allocate and construct a t_TYPE object from the given arguments.
Declared in <bslma_allocatorutil.h>
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 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.
pointer to the newly allocated and constructed t_TYPE object
| Name | Description |
|---|---|
| allocator | allocator from which to allocate and possibly pass to the constructor |
| argument1 | first constructor argument |
| arguments | remaining constructor arguments |