chsvlib
chsv helper source code

◆ fill_n()

void Chusov::Memory::fill_n ( ForwardIterator  start,
std::size_t  size,
const T &  value 
)
noexcept

Copy-assigns a value to all elements of a sequence specified by a starting iterator and the sequence size.

Template Parameters
ForwardIteratorAn output forward iterator used to specify a sequence of elements which are copy-assigned the value.
TA type of the value to copy-assign to all elements of the output sequence.
Parameters
startAn iterator associated with the first element of the sequence to accept value as a result of assignment.
sizeA number of elements in the output sequence to copy-assign value.
valueA sample to copy to all elements to the output sequence.
Exceptions
Anyexceptions thrown as a result of invoking copy-assignment of the sequence elements.

All elements of the output sequence must exist prior to the operation for the assignment to take place, i.e. the output memory space must be initialized. To fill uninitialized memory with copies of an element, use construct_fill_n.