BloombergLP::bslalg::DequePrimitives::uninitializedFillNBack

Append copies of a value to the back of an uninitialized deque range.

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<class ALLOCATOR>
static
void
uninitializedFillNBack(
    Iterator* toEnd,
    Iterator fromEnd,
    size_type numElements,
    VALUE_TYPE const& value,
    ALLOCATOR allocator);

Description

Append the specified numElements copies of the specified value to the deque ending at the specified fromEnd iterator, passing the specified allocator through to the new elements, and load into the specified toEnd an iterator pointing to the end of the data after appending (i.e., fromEnd + numElements). The behavior is undefined unless fromEnd + numElements is a valid iterator (i.e., the block pointer array holds enough room after the fromEnd position to insert numElements).

Parameters

NameDescription
toEndloads the end iterator after appending
fromEndcurrent end of the deque
numElementsnumber of copies of value to append
valuevalue copied into each appended element
allocatorallocator passed to element constructors