Default‐construct a TARGET_TYPE object at the specified address.
Synopsis
Declared in <bslma_constructionutil.h>
template<
class TARGET_TYPE,
class ALLOCATOR>
static
void
construct(
TARGET_TYPE* address,
ALLOCATOR const& allocator);
Description
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.
Parameters
Name |
Description |
address |
uninitialized storage for the new object |
allocator |
allocator supplied to the constructor, if applicable |
Created with MrDocs