[#absl-c_copy_n-03] = xref:absl.adoc[absl]::c_copy_n :relfileprefix: ../ :mrdocs: `c_copy_n` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <algorithm> `std::copy_n()` function to copy a container's first N elements into an iterator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename C, typename Size, typename OutputIterator> constexpr /* implementation-defined */ xref:absl/c_copy_n-01.adoc[c_copy_n]( C const& input, Size n, OutputIterator&& output); ---- [.small]#xref:absl/c_copy_n-01.adoc[_» more..._]# Copies the first `n` elements from `input` to `output`. `absl::c_copy_n(input, n, output)` is equivalent to `std::copy_n(std::begin(input), n, std::begin(output))`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename C, typename Size, typename OutputRange> constexpr /* implementation-defined */ xref:absl/c_copy_n-07.adoc[c_copy_n]( C const& input, Size n, OutputRange&& output); ---- [.small]#xref:absl/c_copy_n-07.adoc[_» more..._]# == Return Value * An iterator to the end of the copied range in the output. * This overload returns no value; the results are written into `output`. == Parameters [cols="1,4"] |=== | Name| Description | *input* | The container whose elements to copy. | *n* | The number of elements to copy. | *output* | The output iterator receiving the copied elements. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#