| Home | Libraries | People | FAQ | More

## Function template copy_n

boost::algorithm::copy_n — Copies exactly n (n > 0) elements from the range starting at first to the range starting at result.

## Synopsis

    // In header: <boost/algorithm/cxx11/copy_n.hpp>

    template<typename InputIterator, typename Size, typename OutputIterator>
      OutputIterator copy_n(InputIterator first, Size n, OutputIterator result);

## Description

| Note
This function is part of the C++2011 standard library. We will use the standard one if it is available, otherwise we have our own implementation.

Parameters:

`first` | The start of the input sequence
`n` | The number of elements to copy
`result` | An output iterator to write the results into

Returns: | The updated output iterator