Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

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] Note

This function is part of the C++2011 standard library.

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


PrevUpHomeNext