3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template copy_n</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="The Boost Algorithm Library">
8 <link rel="up" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html" title="Header <boost/algorithm/cxx11/copy_n.hpp>">
9 <link rel="prev" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html" title="Header <boost/algorithm/cxx11/copy_n.hpp>">
10 <link rel="next" href="../../header/boost/algorithm/cxx11/find_if_not_hpp.html" title="Header <boost/algorithm/cxx11/find_if_not.hpp>">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../header/boost/algorithm/cxx11/find_if_not_hpp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
25 <div class="refentry">
26 <a name="boost.algorithm.copy_n"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Function template copy_n</span></h2>
29 <p>boost::algorithm::copy_n — Copies exactly n (n > 0) elements from the range starting at first to the range starting at result. </p>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html" title="Header <boost/algorithm/cxx11/copy_n.hpp>">boost/algorithm/cxx11/copy_n.hpp</a>>
35 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> InputIterator<span class="special">,</span> <span class="keyword">typename</span> Size<span class="special">,</span> <span class="keyword">typename</span> OutputIterator<span class="special">></span>
36 <span class="identifier">BOOST_CXX14_CONSTEXPR</span> <span class="identifier">OutputIterator</span>
37 <span class="identifier">copy_n</span><span class="special">(</span><span class="identifier">InputIterator</span> first<span class="special">,</span> <span class="identifier">Size</span> n<span class="special">,</span> <span class="identifier">OutputIterator</span> result<span class="special">)</span><span class="special">;</span></pre></div>
38 <div class="refsect1">
39 <a name="idm45158680760672"></a><h2>Description</h2>
43 <div class="note"><table border="0" summary="Note">
45 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
46 <th align="left">Note</th>
48 <tr><td align="left" valign="top"><p>This function is part of the C++2011 standard library. </p></td></tr>
52 <div class="variablelist"><table border="0" class="variablelist compact">
54 <col align="left" valign="top">
59 <td><p><span class="term">Parameters:</span></p></td>
60 <td><div class="variablelist"><table border="0" class="variablelist compact">
62 <col align="left" valign="top">
67 <td><p><span class="term"><code class="computeroutput">first</code></span></p></td>
68 <td><p>The start of the input sequence </p></td>
71 <td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
72 <td><p>The number of elements to copy </p></td>
75 <td><p><span class="term"><code class="computeroutput">result</code></span></p></td>
76 <td><p>An output iterator to write the results into </p></td>
82 <td><p><span class="term">Returns:</span></p></td>
83 <td><p>The updated output iterator</p></td>
89 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
90 <td align="left"></td>
91 <td align="right"><div class="copyright-footer">Copyright © 2010-2012 Marshall Clow<p>
92 Distributed under the Boost Software License, Version 1.0. (See accompanying
93 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
98 <div class="spirit-nav">
99 <a accesskey="p" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../header/boost/algorithm/cxx11/find_if_not_hpp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>