Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

rotate_copy
PrevUpHomeNext
Prototype

template<class ForwardRange, class OutputIterator>
OutputIterator rotate_copy(
    const ForwardRange& rng,
    typename range_iterator<ForwardRange>::type middle,
    OutputIterator out);

Description

rotate_copy rotates the elements in a range. It copies the two ranges [begin(rng), middle) and [middle, end(rng)) to out.

Definition

Defined in the header file boost/range/algorithm/rotate_copy.hpp

Requirements
  • ForwardRange is a model of the Forward Range Concept.
  • ForwardRange is mutable.
  • OutputIterator is a model of the OutputIteratorConcept.
Precondition:
  • [begin(rng), middle) is a valid range.
  • [middle, end(rng)) is a valid range.
Complexity

Linear. Exactly distance(rng) elements are copied.


PrevUpHomeNext