destructiveMoveAndInsert overloads
Synopses
Declared in <bslalg_arrayprimitives.h>
Move 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), inserting at the specified position (after translating from fromBegin to toBegin) the specified numElements objects initialized to default values, ensuring that the specified fromEndPtr points to the first uninitialized element in [fromBegin .. fromEnd)] as the elements are moved from source to destination. On return, the elements in the input range are invalid, i.e., their destructors must not be called after this operation returns. If a constructor throws an exception during this operation, the output array is left in an uninitialized state. If a default constructor throws an exception, the input array is unaffected; otherwise, if a (copy or move) constructor throws an exception during this operation, the input elements in the range [fromBegin .. *fromEndPtr)] are left in a valid but unspecified state and the remaining portion of the input array is left in an uninitialized state. The behavior is undefined unless 'fromBegin <= position <= fromEnd' and toBegin refers to space sufficient to hold fromEnd ‐ fromBegin + 1 elements.
template<class ALLOCATOR>
static
void
destructiveMoveAndInsert(
bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
bsl::allocator_traits<ALLOCATOR>::pointer* fromEndPtr,
bsl::allocator_traits<ALLOCATOR>::pointer fromBegin,
bsl::allocator_traits<ALLOCATOR>::pointer position,
bsl::allocator_traits<ALLOCATOR>::pointer fromEnd,
size_type numElements,
ALLOCATOR allocator);
Move the elements of the (template parameter) TARGET_TYPE in the starting at the specified fromBegin address and ending immediately before the specified fromEnd address into the uninitialized array beginning at the specified toBegin location using the specified allocator to supply memory (if required), inserting at the specified position (after translating from fromBegin to toBegin) numElements objects initialized to default values, ensuring that the specified fromEndPtr points to the first uninitialized element in [fromBegin .. fromEnd)] as the elements are moved from source to destination. On return, the elements in the input range are invalid, i.e., their destructors must not be called after this operation returns. If a constructor throws an exception during this operation, the output array is left in an uninitialized state. If a default constructor throws an exception, the input array is unaffected; otherwise, if a (copy or move) constructor throws an exception during this operation, the input elements in the range [fromBegin .. *fromEndPtr)] are left in a valid but unspecified state and the remaining portion of the input array is left in an uninitialized state. The behavior is undefined unless fromBegin <= position <= fromEnd and toBegin refers to space sufficient to hold fromEnd ‐ fromBegin + numElements elements.
template<class TARGET_TYPE>
static
void
destructiveMoveAndInsert(
TARGET_TYPE* toBegin,
TARGET_TYPE** fromEndPtr,
TARGET_TYPE* fromBegin,
TARGET_TYPE* position,
TARGET_TYPE* fromEnd,
size_type numElements,
bslma::Allocator* allocator);
Move 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), inserting at the specified position (after translating from fromBegin to toBegin) the specified numElements copies of the specified value, ensuring that the specified fromEndPtr points to the first uninitialized element in [fromBegin .. fromEnd)] as the elements are moved from source to destination. On return, the elements in the input range are invalid, i.e., their destructors must not be called after this operation returns. If a constructor throws an exception during this operation, the output array is left in an uninitialized state. If a (copy or move) constructor throws an exception during this operation, the input elements in the range [fromBegin .. *fromEndPtr)] are left in a valid but unspecified state and the remaining portion of the input array is left in an uninitialized state. The behavior is undefined unless fromBegin <= position <= fromEnd and toBegin refers to space sufficient to hold fromEnd ‐ fromBegin + numElements elements.
template<class ALLOCATOR>
static
void
destructiveMoveAndInsert(
bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
bsl::allocator_traits<ALLOCATOR>::pointer* fromEndPtr,
bsl::allocator_traits<ALLOCATOR>::pointer fromBegin,
bsl::allocator_traits<ALLOCATOR>::pointer position,
bsl::allocator_traits<ALLOCATOR>::pointer fromEnd,
bsl::allocator_traits<ALLOCATOR>::value_type const& value,
size_type numElements,
ALLOCATOR allocator);
Move the elements of the parameterized TARGET_TYPE in the array starting at the specified fromBegin address and ending immediately before the specified fromEnd address into an uninitialized array of TARGET_TYPE at the specified toBegin address, inserting at the specified position (after translating from fromBegin to toBegin) the specified numElements copies of the specified value. Keep the pointer at the specified fromEndPtr address pointing to the first uninitialized element in '[ fromBegin,] fromEnd)' as the elements are moved from source to destination. The behavior is undefined unless fromBegin <= position <= fromEnd and the destination array contains at least (fromEnd ‐ fromBegin) + numElements uninitialized elements. If a copy constructor or assignment operator for TARGET_TYPE throws an exception, then any elements created in the output array are destroyed and the elements in the range [ fromBegin, *fromEndPtr )] will have unspecified but valid values.
template<class TARGET_TYPE>
static
void
destructiveMoveAndInsert(
TARGET_TYPE* toBegin,
TARGET_TYPE** fromEndPtr,
TARGET_TYPE* fromBegin,
TARGET_TYPE* position,
TARGET_TYPE* fromEnd,
TARGET_TYPE const& value,
size_type numElements,
bslma::Allocator* allocator);
Move 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), inserting at the specified position (after translating from fromBegin to toBegin) the specified numElements copies of the non‐modifiable elements from the range starting at the specified first iterator of (template parameter) type FWD_ITER and ending immediately before the specified last sentinel or iterator, ensuring that the specified fromEndPtr points to the first uninitialized element in [fromBegin .. fromEnd)] as the elements are moved from source to destination. On return, the elements in the input range are invalid, i.e., their destructors must not be called after this operation returns. If a constructor throws an exception during this operation, the output array is left in an uninitialized state. If a constructor other than the copy or move constructor throws an exception during this operation, the input array is unaffected; otherwise, if a copy or move constructor throws an exception during this operation, the input elements in the range [fromBegin .. *fromEndPtr)] are left in a valid but unspecified state and the remaining portion of the input array is left in an uninitialized state. The behavior is undefined unless fromBegin <= position <= fromEnd and toBegin refers to space sufficient to hold fromEnd ‐ fromBegin + numElements elements.
template<
class ALLOCATOR,
class FWD_ITER,
class SENTINEL>
static
void
destructiveMoveAndInsert(
bsl::allocator_traits<ALLOCATOR>::pointer toBegin,
bsl::allocator_traits<ALLOCATOR>::pointer* fromEndPtr,
bsl::allocator_traits<ALLOCATOR>::pointer fromBegin,
bsl::allocator_traits<ALLOCATOR>::pointer position,
bsl::allocator_traits<ALLOCATOR>::pointer fromEnd,
FWD_ITER first,
SENTINEL last,
size_type numElements,
ALLOCATOR allocator);
Move the elements of the parameterized TARGET_TYPE in the array starting at the specified fromBegin address and ending immediately before the specified fromEnd address into an uninitialized array of TARGET_TYPE at the specified toBegin address, inserting at the specified position (after translating from fromBegin to toBegin) the specified numElements copies of the non‐modifiable elements from the range starting at the specified first iterator of the parameterized FWD_ITER type and ending immediately before the specified last sentinel or iterator. Keep the pointer at the specified fromEndPtr to point to the first uninitialized element in [fromBegin, fromEnd)] as the elements are moved from source to destination. The behavior is undefined unless fromBegin <= position <= fromEnd, the destination array contains at least (fromEnd ‐ fromBegin) + numElements uninitialized elements after toBegin, and numElements is the distance from first to last. If a copy constructor or assignment operator for TARGET_TYPE throws an exception, then any elements created in the output array are destroyed and the elements in the range [ fromBegin, *fromEndPtr )] will have unspecified but valid values.
template<
class TARGET_TYPE,
class FWD_ITER,
class SENTINEL>
static
void
destructiveMoveAndInsert(
TARGET_TYPE* toBegin,
TARGET_TYPE** fromEndPtr,
TARGET_TYPE* fromBegin,
TARGET_TYPE* position,
TARGET_TYPE* fromEnd,
FWD_ITER first,
SENTINEL last,
size_type numElements,
bslma::Allocator* allocator);
Created with MrDocs