[#bsl-allocator-0ac-construct-09] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0ac.adoc[allocator<void>]::construct :relfileprefix: ../../ :mrdocs: `construct` overloads == Synopses Declared in `<bslma_bslallocator.h>` Create a default‐constructed object of (template parameter) `ELEMENT_TYPE` at the specified `address`. If `ELEMENT_TYPE` supports `bslma`‐style allocation, this allocator passes itself to the extended default constructor. If the constructor throws, the memory at `address` is left in an unspecified state. The behavior is undefined unless `address` refers to a block of sufficient size and properly aligned for objects of `ELEMENT_TYPE`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ELEMENT_TYPE> void xref:bsl/allocator-0ac/construct-0f.adoc[construct](ELEMENT_TYPE* address); ---- [.small]#xref:bsl/allocator-0ac/construct-0f.adoc[_» more..._]# Create an object of (template parameter) `ELEMENT_TYPE` at the specified `address`, constructed by forwarding the specified `argument1` and the (variable number of) additional specified `arguments` to the corresponding constructor of `ELEMENT_TYPE`. If `ELEMENT_TYPE` supports `bslma`‐style allocation, this allocator passes itself to the constructor. If the constructor throws, the memory at `address` is left in an unspecified state. 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 `ELEMENT_TYPE` constructor; only `argument1` can be forwarded as an unqualified lvalue. The behavior is undefined unless `address` refers to a block of sufficient size and properly aligned for objects of `ELEMENT_TYPE`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ELEMENT_TYPE, class ARG1, class... ARGS> void xref:bsl/allocator-0ac/construct-04.adoc[construct]( ELEMENT_TYPE* address, ARG1& argument1, ARGS&&... arguments); ---- [.small]#xref:bsl/allocator-0ac/construct-04.adoc[_» more..._]# Same as the preceding `construct` overload, using perfect forwarding. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ELEMENT_TYPE, class ARG1, class... ARGS> void xref:bsl/allocator-0ac/construct-07.adoc[construct]( ELEMENT_TYPE* address, ARG1&& argument1, ARGS&&... arguments); ---- [.small]#xref:bsl/allocator-0ac/construct-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#