Imported Upstream version 1.64.0
[platform/upstream/boost.git] / doc / html / boost_asio / reference / buffer_copy / overload2.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>buffer_copy (2 of 30 overloads)</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="../../../boost_asio.html" title="Boost.Asio">
8 <link rel="up" href="../buffer_copy.html" title="buffer_copy">
9 <link rel="prev" href="overload1.html" title="buffer_copy (1 of 30 overloads)">
10 <link rel="next" href="overload3.html" title="buffer_copy (3 of 30 overloads)">
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="overload1.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../buffer_copy.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload3.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="boost_asio.reference.buffer_copy.overload2"></a><a class="link" href="overload2.html" title="buffer_copy (2 of 30 overloads)">buffer_copy
28         (2 of 30 overloads)</a>
29 </h4></div></div></div>
30 <p>
31           Copies bytes from a source buffer to a target buffer.
32         </p>
33 <pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">buffer_copy</span><span class="special">(</span>
34     <span class="keyword">const</span> <span class="identifier">mutable_buffer</span> <span class="special">&amp;</span> <span class="identifier">target</span><span class="special">,</span>
35     <span class="keyword">const</span> <span class="identifier">const_buffers_1</span> <span class="special">&amp;</span> <span class="identifier">source</span><span class="special">);</span>
36 </pre>
37 <h6>
38 <a name="boost_asio.reference.buffer_copy.overload2.h0"></a>
39           <span class="phrase"><a name="boost_asio.reference.buffer_copy.overload2.parameters"></a></span><a class="link" href="overload2.html#boost_asio.reference.buffer_copy.overload2.parameters">Parameters</a>
40         </h6>
41 <div class="variablelist">
42 <p class="title"><b></b></p>
43 <dl class="variablelist">
44 <dt><span class="term">target</span></dt>
45 <dd><p>
46                 A modifiable buffer representing the memory region to which the bytes
47                 will be copied.
48               </p></dd>
49 <dt><span class="term">source</span></dt>
50 <dd><p>
51                 A non-modifiable buffer representing the memory region from which
52                 the bytes will be copied.
53               </p></dd>
54 </dl>
55 </div>
56 <h6>
57 <a name="boost_asio.reference.buffer_copy.overload2.h1"></a>
58           <span class="phrase"><a name="boost_asio.reference.buffer_copy.overload2.return_value"></a></span><a class="link" href="overload2.html#boost_asio.reference.buffer_copy.overload2.return_value">Return
59           Value</a>
60         </h6>
61 <p>
62           The number of bytes copied.
63         </p>
64 <h6>
65 <a name="boost_asio.reference.buffer_copy.overload2.h2"></a>
66           <span class="phrase"><a name="boost_asio.reference.buffer_copy.overload2.remarks"></a></span><a class="link" href="overload2.html#boost_asio.reference.buffer_copy.overload2.remarks">Remarks</a>
67         </h6>
68 <p>
69           The number of bytes copied is the lesser of:
70         </p>
71 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
72 <li class="listitem">
73               <code class="computeroutput"><span class="identifier">buffer_size</span><span class="special">(</span><span class="identifier">target</span><span class="special">)</span></code>
74             </li>
75 <li class="listitem">
76               <code class="computeroutput"><span class="identifier">buffer_size</span><span class="special">(</span><span class="identifier">source</span><span class="special">)</span></code>
77             </li>
78 </ul></div>
79 <p>
80           This function is implemented in terms of <code class="computeroutput"><span class="identifier">memcpy</span></code>,
81           and consequently it cannot be used to copy between overlapping memory regions.
82         </p>
83 </div>
84 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
85 <td align="left"></td>
86 <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2017 Christopher M. Kohlhoff<p>
87         Distributed under the Boost Software License, Version 1.0. (See accompanying
88         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>)
89       </p>
90 </div></td>
91 </tr></table>
92 <hr>
93 <div class="spirit-nav">
94 <a accesskey="p" href="overload1.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../buffer_copy.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overload3.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
95 </div>
96 </body>
97 </html>