• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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 &lt;boost/algorithm/cxx11/copy_n.hpp&gt;">
9<link rel="prev" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html" title="Header &lt;boost/algorithm/cxx11/copy_n.hpp&gt;">
10<link rel="next" href="../../header/boost/algorithm/cxx11/find_if_not_hpp.html" title="Header &lt;boost/algorithm/cxx11/find_if_not.hpp&gt;">
11</head>
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>
20</tr></table>
21<hr>
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>
24</div>
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 &gt; 0) elements from the range starting at first to the range starting at result. </p>
30</div>
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: &lt;<a class="link" href="../../header/boost/algorithm/cxx11/copy_n_hpp.html" title="Header &lt;boost/algorithm/cxx11/copy_n.hpp&gt;">boost/algorithm/cxx11/copy_n.hpp</a>&gt;
33
34</span>
35<span class="keyword">template</span><span class="special">&lt;</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">&gt;</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="idm45375289174576"></a><h2>Description</h2>
40<p>
41
42</p>
43<div class="note"><table border="0" summary="Note">
44<tr>
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>
47</tr>
48<tr><td align="left" valign="top"><p>This function is part of the C++2011 standard library. </p></td></tr>
49</table></div>
50<p>
51</p>
52<div class="variablelist"><table border="0" class="variablelist compact">
53<colgroup>
54<col align="left" valign="top">
55<col>
56</colgroup>
57<tbody>
58<tr>
59<td><p><span class="term">Parameters:</span></p></td>
60<td><div class="variablelist"><table border="0" class="variablelist compact">
61<colgroup>
62<col align="left" valign="top">
63<col>
64</colgroup>
65<tbody>
66<tr>
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>
69</tr>
70<tr>
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>
73</tr>
74<tr>
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>
77</tr>
78</tbody>
79</table></div></td>
80</tr>
81<tr>
82<td><p><span class="term">Returns:</span></p></td>
83<td><p>The updated output iterator</p></td>
84</tr>
85</tbody>
86</table></div>
87</div>
88</div>
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>)
94      </p>
95</div></td>
96</tr></table>
97<hr>
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>
100</div>
101</body>
102</html>
103