chsvlib
chsv helper source code

◆ move_n()

OutputIterator Chusov::Memory::move_n ( InputIterator  input,
std::size_t  size,
OutputIterator  output 
)
noexcept

Move-assigns a given number of elements starting from one referred to by an input iterator to a place addressed by an output iterator.

Template Parameters
InputIteratorThe type of an input iterator which addresses the start of a sequence of elements to move.
OutputIteratorThe type of an output iterator specifying the destination of the move operation.
Parameters
inputThe input iterator associated with the beginning of the input sequence of elements to move.
sizeThe number of elements in the input sequence to move.
outputThe output iterator.
Returns
The output iterator after the move operation, i.e. the iterator associated with the position in the destination after the last moved-in element, or output, if size is zero.
Exceptions
Anyexception that originates from move-assignment of the sequence elements.

If the move-assignment is direct, i.e. dereferencing of the output iterator yields an actual address in memory rather than some proxy, and the assignment used is defined for two objects of the type T, then the output sequence must contain valid elements of the type T prior to the operation, i.e. the destination memory must not be uninitialized. To move into uninitialized memory, use construct_move_n.