[#BloombergLP-bslalg-ScalarPrimitives-defaultConstruct-015] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ScalarPrimitives.adoc[ScalarPrimitives]::defaultConstruct :relfileprefix: ../../../ :mrdocs: `defaultConstruct` overloads == Synopses Declared in `<bslalg_scalarprimitives.h>` Build a default‐initialized object of the parameterized `TARGET_TYPE` in the uninitialized memory at the specified `address`, as if by using the `TARGET_TYPE` default constructor. If the specified `allocator` is based on `bslma::Allocator` and `TARGET_TYPE` takes an allocator constructor argument, then `allocator` is passed to the default constructor. If the constructor throws, the `address` is left in an uninitialized state. Note that this operation may bypass the constructor and simply fill memory with 0 if `TARGET_TYPE` has the trivial default constructor trait and does not use `bslma::Allocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void xref:BloombergLP/bslalg/ScalarPrimitives/defaultConstruct-012.adoc[defaultConstruct]( TARGET_TYPE* address, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ScalarPrimitives/defaultConstruct-012.adoc[_» more..._]# Same as the preceding overload, ignoring `allocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void xref:BloombergLP/bslalg/ScalarPrimitives/defaultConstruct-02.adoc[defaultConstruct]( TARGET_TYPE* address, void* allocator); ---- [.small]#xref:BloombergLP/bslalg/ScalarPrimitives/defaultConstruct-02.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#