[#BloombergLP-bslma-ConstructionUtil-construct-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/ConstructionUtil.adoc[ConstructionUtil]::construct :relfileprefix: ../../../ :mrdocs: `construct` overloads == Synopses Declared in `<bslma_constructionutil.h>` Create a default‐constructed object of (template parameter) `TARGET_TYPE` at the specified `address`. If `allocator` is a `bslma`‐compatible allocator and `TARGET_TYPE` supports `bslma`‐style allocation, `allocator` is passed to the default extended constructor; otherwise, `allocator` is ignored. If the constructor throws, the memory at `address` is left in an unspecified state. The behavior is undefined unless `address` refers to a block that is of sufficient size and properly aligned for objects of `TARGET_TYPE`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TARGET_TYPE, class ALLOCATOR> static void xref:BloombergLP/bslma/ConstructionUtil/construct-0d.adoc[construct]( TARGET_TYPE* address, ALLOCATOR const& allocator); ---- [.small]#xref:BloombergLP/bslma/ConstructionUtil/construct-0d.adoc[_» more..._]# Create an object of (template parameter) `TARGET_TYPE` at the specified `address`, constructed by forwarding the specified `argument1` and the (variable number of) additional specified `arguments` to the corresponding constructor of `TARGET_TYPE`. If the specified `allocator` is a bslma‐compatible allocator and `TARGET_TYPE` supports `bslma`‐style allocation, the allocator is passed to the constructor; otherwise, `allocator` is ignored. 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 `TARGET_TYPE` constructor; only `argument1` can be forwarded as an unqualified lvalue. The behavior is undefined unless `address` refers to a block that is of sufficient size and properly aligned for objects of `TARGET_TYPE`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TARGET_TYPE, class ALLOCATOR, class ARG1, class... ARGS> static void xref:BloombergLP/bslma/ConstructionUtil/construct-0e.adoc[construct]( TARGET_TYPE* address, ALLOCATOR const& allocator, ARG1&& argument1, ARGS&&... arguments); ---- [.small]#xref:BloombergLP/bslma/ConstructionUtil/construct-0e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#