copyConstruct overloads
Synopses
Declared in <bslalg_arrayprimitives.h>
Same as the preceding copyConstruct overload, for pointer ranges.
template<
class ALLOCATOR,
class SOURCE_TYPE>
static
void
copyConstruct(
bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
SOURCE_TYPE* fromBegin,
SOURCE_TYPE* fromEnd,
ALLOCATOR allocator);
Same as the preceding overload, taking pointer iterators.
template<
class TARGET_TYPE,
class SOURCE_TYPE>
static
void
copyConstruct(
TARGET_TYPE* toBegin,
SOURCE_TYPE* fromBegin,
SOURCE_TYPE* fromEnd,
bslma::Allocator* allocator);
Copy the elements of type allocator_traits<ALLOCATOR>::value_type in the range beginning at the specified fromBegin location and ending immediately before the specified fromEnd location into the uninitialized array beginning at the specified toBegin location, using the specified allocator to supply memory (if required). If a constructor throws an exception during this operation, the output array is left in an uninitialized state. The behavior is undefined unless toBegin refers to space sufficient to hold fromEnd ‐ fromBegin elements.
template<
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
static
void
copyConstruct(
bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
FWD_ITER fromBegin,
SENTINEL fromEnd,
ALLOCATOR allocator);
Copy into an uninitialized array of (the template parameter) TARGET_TYPE beginning at the specified toBegin address, the elements in the array of TARGET_TYPE starting at the specified fromBegin address and ending immediately before the specified fromEnd address. If the (template parameter) ALLOCATOR type is derived from bslma::Allocator and TARGET_TYPE supports bslma allocators, then the specified allocator is passed to each invocation of the TARGET_TYPE copy constructor. If a TARGET_TYPE constructor throws an exception during the operation, then the destructor is called on any newly‐constructed elements, leaving the output array in an uninitialized state.
template<
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
static
void
copyConstruct(
TARGET_TYPE* toBegin,
FWD_ITER fromBegin,
SENTINEL fromEnd,
bslma::Allocator* allocator);
Created with MrDocs