29#ifndef RANGES_V3_ALGORITHM_MERGE_HPP
30#define RANGES_V3_ALGORITHM_MERGE_HPP
37#include <range/v3/algorithm/result_types.hpp>
46#include <range/v3/utility/static_const.hpp>
48#include <range/v3/detail/prologue.hpp>
54 template<
typename I0,
typename I1,
typename O>
55 using merge_result = detail::in1_in2_out_result<I0, I1, O>;
57 RANGES_FUNC_BEGIN(merge)
69 mergeable<I0, I1, O, C, P0, P1>)
70 constexpr merge_result<I0, I1, O> RANGES_FUNC(merge)(I0 begin0,
79 for(; begin0 != end0 && begin1 != end1; ++out)
92 auto t0 = ranges::copy(begin0, end0, out);
93 auto t1 = ranges::copy(begin1, end1, t0.out);
94 return {t0.in, t1.in, t1.out};
98 template(
typename Rng0,
106 constexpr merge_result<borrowed_iterator_t<Rng0>, borrowed_iterator_t<Rng1>, O>
107 RANGES_FUNC(merge)(Rng0 && rng0,
114 return (*
this)(begin(rng0),
124 RANGES_FUNC_END(merge)
129 using ranges::merge_result;
134#include <range/v3/detail/epilogue.hpp>
The sentinel_for concept.
decltype(begin(declval(Rng &))) iterator_t
Definition access.hpp:698
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition meta.hpp:541
Definition identity.hpp:25
Definition comparisons.hpp:50