chsvlib
chsv helper source code

◆ fill()

void Chusov::Memory::fill ( ForwardIterator  start,
ForwardIterator  end,
const T &  value 
)
noexcept

Copy-assigns a value to all elements of a sequence specified by a pair of forward iterators.

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 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.
endAn iterator that refers to a position past the last element of the output sequence of elements.
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.