13#ifndef RANGES_V3_ALGORITHM_ROTATE_COPY_HPP
14#define RANGES_V3_ALGORITHM_ROTATE_COPY_HPP
21#include <range/v3/algorithm/result_types.hpp>
29#include <range/v3/utility/static_const.hpp>
31#include <range/v3/detail/prologue.hpp>
37 template<
typename I,
typename O>
38 using rotate_copy_result = detail::in_out_result<I, O>;
40 RANGES_FUNC_BEGIN(rotate_copy)
43 template(typename I, typename S, typename O, typename P =
identity)(
46 constexpr rotate_copy_result<I, O>
47 RANGES_FUNC(rotate_copy)(I first, I middle, S last, O out)
49 auto res = ranges::copy(middle, std::move(last), std::move(out));
50 return {std::move(res.in),
51 ranges::copy(std::move(first), middle, std::move(res.out)).out};
55 template(
typename Rng,
typename O,
typename P =
identity)(
58 constexpr rotate_copy_result<borrowed_iterator_t<Rng>, O>
61 return (*
this)(begin(rng), std::move(middle), end(rng), std::move(out));
64 RANGES_FUNC_END(rotate_copy)
68 using ranges::rotate_copy;
69 using ranges::rotate_copy_result;
74#include <range/v3/detail/epilogue.hpp>
The forward_iterator concept.
The indirectly_copyable concept.
The sentinel_for concept.
The weakly_incrementable concept.
decltype(begin(declval(Rng &))) iterator_t
Definition access.hpp:698
Definition identity.hpp:25