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)
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)(
56 requires range<Rng> AND weakly_incrementable<O> AND
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>
template(typename Rng, typename O, typename P=identity)(requires range< Rng > AND weakly_incrementable< O > AND indirectly_copyable< iterator_t< Rng >
This is an overloaded member function, provided for convenience. It differs from the above function o...
CPP_concept sentinel_for
\concept sentinel_for
Definition: concepts.hpp:306
CPP_concept forward_iterator
\concept forward_iterator
Definition: concepts.hpp:370
CPP_concept indirectly_copyable
\concept indirectly_copyable
Definition: concepts.hpp:782
CPP_concept weakly_incrementable
\concept weakly_incrementable
Definition: concepts.hpp:268
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
Definition: identity.hpp:25