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
template<class BidirectionalRange> BidirectionalRange& reverse(BidirectionalRange& rng); template<class BidirectionalRange> const BidirectionalRange& reverse(const BidirectionalRange& rng);
reverse reverses a range.
Returns a reference to the reversed range.
Defined in the header file boost/range/algorithm/reverse.hpp
BidirectionalRange
is a model of the Bidirectional
Range Concept.
BidirectionalRange
is mutable.
Linear. reverse makes
distance(rng)/2 calls to iter_swap.