function object
std::ranges::copy_n
- Header
<algorithm>- Draft
- [alg.copy]
- Scope
std::ranges- cppreference
- std::ranges::copy_n
Synopsis
inline constexpr /* implementation-defined */ copy_n = {};Call signatures
copy_n is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template<std::input_iterator I, std::weakly_incrementable O> requires std::indirectly_copyable<I, O> constexpr std::ranges::copy_n_result<I, O> copy_n( I first, std::iter_difference_t<I> n, O result); - (2)
template< class ExecutionPolicy, std::random_access_iterator I, std::random_access_iterator O, std::sized_sentinel_for<O> OutS> requires execution-policy<ExecutionPolicy> && std::indirectly_copyable<I, O> std::ranges::in_out_result<I, O> copy_n( ExecutionPolicy&&, I first, std::iter_difference_t<I> n, O result, OutS result_last) noexcept;