chsvlib
chsv helper source code

◆ operator+() [2/2]

transforming_iterator<BaseRandomAccessIterator, TransformingFunctor> Chusov::Memory::operator+ ( typename transforming_iterator< BaseRandomAccessIterator, TransformingFunctor >::difference_type  n,
const transforming_iterator< BaseRandomAccessIterator, TransformingFunctor > &  iter 
)

Creates a copy of a transforming iterator associated with a position shifted by a specified number to the end.

Template Parameters
BaseRandomAccessIteratorAn iterator adopted by the transforming iterator iter.
TransformingFunctorA functional object used by the transforming iterator iter to obtain values by applying the functional object to respective values of the adopted iterator.
Parameters
nA number of elements by which the resulting iterator is offset towards the end (for non-negative values of n) or toward the beginning (for negative n) of the iterated sequence.
iterAn original iterator which is shifted by n to produce the returned iterator.
Returns
The resulting iterator.

The operator is implemented by delegating the call to the adopted iterator.

The operator is only implemented if BaseRandomAccessIterator meets the requirements of RandomAccessIterator.