Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
swap_ranges
Prototype

template<class SinglePassRange1, class SinglePassRange2>
SinglePassRange2& swap_ranges(SinglePassRange1& rng1, SinglePassRange& rng2);

Description

swap_ranges swaps each element x in rng1 with the corresponding element y in rng2. Returns a reference to rng2.

Definition

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

Requirements
Complexity

Linear. Exactly distance(rng1) elements are swapped.


PrevUpHomeNext