[#bsl-allocator_traits-0ae-construct]
= xref:bsl.adoc[bsl]::xref:bsl/allocator_traits-0ae.adoc[allocator&lowbar;traits&lt;std::allocator&lt;ALLOCATOR&lowbar;TYPE&gt;&gt;]::construct
:relfileprefix: ../../
:mrdocs:

Construct an object of type `&lowbar;Tp`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename &lowbar;Tp,
    typename&period;&period;&period; &lowbar;Args&gt;
requires &lowbar;&lowbar;can&lowbar;construct&lt;&lowbar;Alloc, &lowbar;Tp, &lowbar;Args&period;&period;&period;&gt;
constexpr
static
void
construct(
    &lowbar;Alloc& &lowbar;&lowbar;a,
    &lowbar;Tp* &lowbar;&lowbar;p,
    &lowbar;Args&&&period;&period;&period; &lowbar;&lowbar;args) noexcept(&lowbar;S&lowbar;nothrow&lowbar;construct&lt;&lowbar;Tp, &lowbar;Args&period;&period;&period;&gt;());
----

== Description

Calls if that expression is well&hyphen;formed, otherwise uses placement&hyphen;new to construct an object of type _&lowbar;Tp_ at location _&lowbar;&lowbar;p_ from the arguments _&lowbar;&lowbar;args&period;&period;&period;_

== Parameters

[cols="1,4"]
|===
| Name| Description
| *&lowbar;&lowbar;a*
| An allocator&period;
| *&lowbar;&lowbar;p*
| Pointer to memory of suitable size and alignment for Tp
| *&lowbar;&lowbar;args*
| Constructor arguments&period;
|===


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