template <class BidirectionalIterator, class OutputIterator>
OutputIterator reverse_copy(BidirectionalIterator first,
BidirectionalIterator last,
OutputIterator result);
Description
Reverse_copy copies elements from the range [first, last)
to the range [result, result + (last - first)) such that the
copy is a reverse of the original range. Specifically: for
every i such that 0 <= i < (last - first), reverse_copy
performs the assignment *(result + (last - first) - i) =
*(first + i).
The value type of BidirectionalIterator is convertible to a
type in OutputIterator's set of value types.
Preconditions
[first, last) is a valid range.
There is enough space to hold all of the elements being copied.
More formally, the requirement is that
[result, result + (last - first)) is a valid range.
The ranges [first, last) and [result, result + (last - first))
do not overlap.