16 #ifndef PAAL_ROTATE_HPP
17 #define PAAL_ROTATE_HPP
20 #include <boost/range/iterator.hpp>
21 #include <boost/range/join.hpp>
37 template <
class ForwardRange>
43 auto const mid = std::begin(rng) + n;
45 boost::make_iterator_range(mid, std::end(rng)),
46 boost::make_iterator_range(std::begin(rng), mid)
53 #endif // PAAL_ROTATE_HPP
typename boost::range_difference< Range >::type range_to_diff_type_t
for given collection returns its difference type
auto rotate(const ForwardRange &rng, range_to_diff_type_t< ForwardRange > n)
returns rotated view of the given range