This struct provides a namespace for utility functions that construct elements of (a template parameter) TARGET_TYPE.
Declared in <bslma_constructionutil.h>
struct ConstructionUtil;
| Name | Description |
|---|---|
construct | construct overloads |
destructiveMove | Create an object of (template parameter) TARGET_TYPE at the specified address by moving from the specified original object, then destroy original. The specified allocator is unused (except possibly in precondition checks). The constructed object will have the same allocator (if any) as original. If bslmf::IsBitwiseMoveable<TARGET_TYPE>::value is true, then the entire operation is a simple memcpy -- no constructors or destructors are invoked; otherwise, this method move-constructs an object at address from the object at original then invokes the destructor on original. If the move constructor throws an exception, the memory at address is left in an uninitialized state and original is left in a valid but unspecified state. The behavior is undefined if original uses an allocator other than allocator to supply memory. Note that if original points to an object of a type derived from TARGET_TYPE (i.e., a slicing move) where TARGET_TYPE has a non-virtual destructor, then original will be only partially destroyed. |
make | make overloads |