public static member function
template <class T, class... Args>
static void construct (allocator_type alloc, T* p, Args&&... args );
Construct an element
Constructs an element object in place on the location pointed by p forwarding Args to its constructor.
Notice that the object is constructed in-place without allocating storage for the element.
In the non-specialized definition of allocator_traits, this member function effectively calls:
if such a call is well formed. Otherwise, it invokes:
::new (static_cast<void*>(p)) T (forward<Args>(args)...)
A specialization for a specific allocator type may provide a different definition.
- Allocator object
allocator_type is an alias of allocator_traits's template parameter.
- Pointer to a block of storage.
- Arguments forwarded to the constructor.
Args is a list of zero or more types.