13#ifndef RANGES_V3_ALGORITHM_MOVE_BACKWARD_HPP
14#define RANGES_V3_ALGORITHM_MOVE_BACKWARD_HPP
20#include <range/v3/algorithm/result_types.hpp>
28#include <range/v3/utility/static_const.hpp>
30#include <range/v3/detail/prologue.hpp>
36 template<
typename I,
typename O>
37 using move_backward_result = detail::in_out_result<I, O>;
39 RANGES_FUNC_BEGIN(move_backward)
42 template(
typename I,
typename S,
typename O)(
45 constexpr move_backward_result<I, O> RANGES_FUNC(move_backward)(I
first, S end_, O out)
47 I i = ranges::next(first, end_), last = i;
49 *--out = iter_move(--i);
54 template(
typename Rng,
typename O)(
57 constexpr move_backward_result<borrowed_iterator_t<Rng>, O>
58 RANGES_FUNC(move_backward)(Rng && rng, O out)
60 return (*
this)(begin(rng), end(rng), std::move(out));
63 RANGES_FUNC_END(move_backward)
67 using ranges::move_backward;
68 using ranges::move_backward_result;
73#include <range/v3/detail/epilogue.hpp>
The bidirectional_iterator concept.
The bidirectional_range concept.
The indirectly_movable concept.
The sentinel_for concept.
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 adjacent_find.hpp:67