]>
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:reverse reverse] | |
7 | ||
8 | [heading Prototype] | |
9 | ||
10 | `` | |
11 | template<class BidirectionalRange> | |
12 | BidirectionalRange& reverse(BidirectionalRange& rng); | |
13 | ||
14 | template<class BidirectionalRange> | |
15 | const BidirectionalRange& reverse(const BidirectionalRange& rng); | |
16 | `` | |
17 | ||
18 | [heading Description] | |
19 | ||
20 | `reverse` reverses a range. Returns a reference to the reversed range. | |
21 | ||
22 | [heading Definition] | |
23 | ||
24 | Defined in the header file `boost/range/algorithm/reverse.hpp` | |
25 | ||
26 | [heading Requirements] | |
27 | ||
28 | * `BidirectionalRange` is a model of the __bidirectional_range__ Concept. | |
29 | * `BidirectionalRange` is mutable. | |
30 | ||
31 | [heading Complexity] | |
32 | ||
33 | Linear. `reverse` makes `distance(rng)/2` calls to `iter_swap`. | |
34 | ||
35 | [endsect] | |
36 | ||
37 |