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,
104 requires range<Rng0> AND range<Rng1> AND
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>
template(typename Rng0, typename Rng1, typename O, typename C=less, typename P0=identity, typename P1=identity)(requires range< Rng0 > AND range< Rng1 > AND mergeable< iterator_t< Rng0 >
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
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
bool_<(T::type::value< U::type::value)> less
A Boolean integral constant wrapper around true if T::type::value is less than U::type::value; false,...
Definition: meta.hpp:255
Definition: identity.hpp:25
Definition: comparisons.hpp:50