]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | [/ |
2 | Copyright 2010 Neil Groves | |
3 | Distributed under the Boost Software License, Version 1.0. | |
4 | (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
5 | /] | |
6 | [section:rotate_copy rotate_copy] | |
7 | ||
8 | [heading Prototype] | |
9 | ||
10 | `` | |
11 | template<class ForwardRange, class OutputIterator> | |
12 | OutputIterator rotate_copy( | |
13 | const ForwardRange& rng, | |
14 | typename range_iterator<ForwardRange>::type middle, | |
15 | OutputIterator out); | |
16 | `` | |
17 | ||
18 | [heading Description] | |
19 | ||
20 | `rotate_copy` rotates the elements in a range. It copies the two ranges `[begin(rng), middle)` and `[middle, end(rng))` to `out`. | |
21 | ||
22 | [heading Definition] | |
23 | ||
24 | Defined in the header file `boost/range/algorithm/rotate_copy.hpp` | |
25 | ||
26 | [heading Requirements] | |
27 | ||
28 | * `ForwardRange` is a model of the __forward_range__ Concept. | |
29 | * `ForwardRange` is mutable. | |
30 | * `OutputIterator` is a model of the `OutputIteratorConcept`. | |
31 | ||
32 | [heading Precondition:] | |
33 | ||
34 | * `[begin(rng), middle)` is a valid range. | |
35 | * `[middle, end(rng))` is a valid range. | |
36 | ||
37 | [heading Complexity] | |
38 | ||
39 | Linear. Exactly `distance(rng)` elements are copied. | |
40 | ||
41 | [endsect] | |
42 | ||
43 |