construct overloads
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.
template<class ELEMENT_TYPE>
void
construct(ELEMENT_TYPE* address);
» 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.
template<
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
void
construct(
ELEMENT_TYPE* address,
ARG1& argument1,
ARGS&&... arguments);
» more...
Same as the preceding construct overload, using perfect forwarding.
template<
class ELEMENT_TYPE,
class ARG1,
class... ARGS>
void
construct(
ELEMENT_TYPE* address,
ARG1&& argument1,
ARGS&&... arguments);
» more...