13 #ifndef RANGES_V3_ALGORITHM_COPY_HPP
14 #define RANGES_V3_ALGORITHM_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 copy_result = detail::in_out_result<I, O>;
40 RANGES_HIDDEN_DETAIL(
namespace _copy CPP_PP_LBRACE())
41 RANGES_FUNC_BEGIN(copy)
47 constexpr copy_result<I, O> RANGES_FUNC(copy)(I
first, S last, O out)
55 template(
typename Rng,
typename O)(
56 requires input_range<Rng> AND weakly_incrementable<O> AND
58 constexpr copy_result<borrowed_iterator_t<Rng>, O>
59 RANGES_FUNC(copy)(Rng && rng, O out)
61 return (*
this)(begin(rng), end(rng), std::move(out));
65 RANGES_HIDDEN_DETAIL(CPP_PP_RBRACE())
67 #ifndef RANGES_DOXYGEN_INVOKED
72 using aux::copy_fn::operator();
73 using _copy::copy_fn::operator();
80 using ranges::copy_result;
81 using ranges::RANGES_HIDDEN_DETAIL(_copy::) copy;
87 #include <range/v3/detail/epilogue.hpp>
template(typename Rng, typename O)(requires input_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 input_iterator
\concept input_iterator
Definition: concepts.hpp:362
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
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
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251