BloombergLP::bslalg::DequePrimitives::uninitializedFillNFront

Prepend copies of a value to the front of an uninitialized deque range.

Synopsis

Declared in <bslalg_dequeprimitives.h>

template<class ALLOCATOR>
static
void
uninitializedFillNFront(
    Iterator* toBegin,
    Iterator fromBegin,
    size_type numElements,
    VALUE_TYPE const& value,
    ALLOCATOR allocator);

Description

Prepend the specified numElements copies of the specified value to the deque starting at the specified fromBegin iterator, passing the specified allocator through to the new elements, and load into the specified toBegin an iterator pointing to the end of the data after prepending, i.e., fromBegin - numElements. The behavior is undefined unless fromBegin - numElements is a valid iterator (i.e., the block pointer array holds enough room before the fromBegin position to insert numElements).

Parameters

NameDescription
toBeginloads the beginning iterator after prepending
fromBegincurrent beginning of the deque
numElementsnumber of copies of value to prepend
valuevalue copied into each prepended element
allocatorallocator passed to element constructors