28#ifndef RANGES_V3_ALGORITHM_AUX_MERGE_N_HPP
29#define RANGES_V3_ALGORITHM_AUX_MERGE_N_HPP
36#include <range/v3/algorithm/result_types.hpp>
45#include <range/v3/utility/static_const.hpp>
47#include <range/v3/detail/prologue.hpp>
53 template<
typename I0,
typename I1,
typename O>
54 using merge_n_result = detail::in1_in2_out_result<I0, I1, O>;
58 template(
typename I0,
typename I1,
typename O,
typename C =
less,
60 requires mergeable<I0, I1, O, C, P0, P1>)
61 merge_n_result<I0, I1, O> operator()(I0 begin0,
62 iter_difference_t<I0> n0,
64 iter_difference_t<I1> n1,
70 using T = merge_n_result<I0, I1, O>;
73 auto b0 = uncounted(begin0);
74 auto b1 = uncounted(begin1);
79 auto res = copy_n(b1, n1, out);
80 begin0 = recounted(begin0, b0, n0orig);
81 begin1 = recounted(begin1, res.in, n1orig);
82 return T{begin0, begin1, res.out};
86 auto res = copy_n(b0, n0, out);
87 begin0 = recounted(begin0, res.in, n0orig);
88 begin1 = recounted(begin1, b1, n1orig);
89 return T{begin0, begin1, res.out};
113#include <range/v3/detail/epilogue.hpp>
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector > >, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
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: merge_n.hpp:57
Definition: identity.hpp:25