<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>buffer</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="basic_waitable_timer/wait/overload2.html" title="basic_waitable_timer::wait (2 of 2 overloads)">
+<link rel="prev" href="basic_yield_context/operator_lb__rb_.html" title="basic_yield_context::operator[]">
<link rel="next" href="buffer/overload1.html" title="buffer (1 of 28 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="basic_waitable_timer/wait/overload2.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="buffer/overload1.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="basic_yield_context/operator_lb__rb_.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="buffer/overload1.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_asio.reference.buffer"></a><a class="link" href="buffer.html" title="buffer">buffer</a>
</h3></div></div></div>
<p>
- <a class="indexterm" name="id1247820"></a>
+ <a class="indexterm" name="idp158098000"></a>
The <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">buffer</span></code> function is used to create a buffer
object to represent raw memory, an array of POD elements, a vector of POD
elements, or a std::string.
</pre>
<p>
In all three cases above, the buffers created are exactly 128 bytes long.
- Note that a vector is <span class="bold"><strong>never</strong></span> automatically
- resized when creating or using a buffer. The buffer size is determined using
- the vector's <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code>
+ Note that a vector is <span class="emphasis"><em>never</em></span> automatically resized when
+ creating or using a buffer. The buffer size is determined using the vector's
+ <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code>
member function, and not its capacity.
</p>
<h5>
<a name="boost_asio.reference.buffer.h0"></a>
- <span><a name="boost_asio.reference.buffer.accessing_buffer_contents"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.accessing_buffer_contents">Accessing
+ <span class="phrase"><a name="boost_asio.reference.buffer.accessing_buffer_contents"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.accessing_buffer_contents">Accessing
Buffer Contents</a>
</h5>
<p>
</p>
<h5>
<a name="boost_asio.reference.buffer.h1"></a>
- <span><a name="boost_asio.reference.buffer.buffer_copying"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffer_copying">Buffer
+ <span class="phrase"><a name="boost_asio.reference.buffer.buffer_copying"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffer_copying">Buffer
Copying</a>
</h5>
<p>
<span class="identifier">vector</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">char</span><span class="special">></span> <span class="identifier">data</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">buffer_size</span><span class="special">(</span><span class="identifier">buffers</span><span class="special">));</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">buffer_copy</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">buffer</span><span class="special">(</span><span class="identifier">data</span><span class="special">),</span> <span class="identifier">buffers</span><span class="special">);</span>
</pre>
+<p>
+ Note that <a class="link" href="buffer_copy.html" title="buffer_copy"><code class="computeroutput"><span class="identifier">buffer_copy</span></code></a> is implemented in terms
+ of <code class="computeroutput"><span class="identifier">memcpy</span></code>, and consequently
+ it cannot be used to copy between overlapping memory regions.
+ </p>
<h5>
<a name="boost_asio.reference.buffer.h2"></a>
- <span><a name="boost_asio.reference.buffer.buffer_invalidation"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffer_invalidation">Buffer
+ <span class="phrase"><a name="boost_asio.reference.buffer.buffer_invalidation"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffer_invalidation">Buffer
Invalidation</a>
</h5>
<p>
</p>
<h5>
<a name="boost_asio.reference.buffer.h3"></a>
- <span><a name="boost_asio.reference.buffer.buffer_arithmetic"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffer_arithmetic">Buffer
+ <span class="phrase"><a name="boost_asio.reference.buffer.buffer_arithmetic"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffer_arithmetic">Buffer
Arithmetic</a>
</h5>
<p>
</p>
<h5>
<a name="boost_asio.reference.buffer.h4"></a>
- <span><a name="boost_asio.reference.buffer.buffers_and_scatter_gather_i_o"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffers_and_scatter_gather_i_o">Buffers
+ <span class="phrase"><a name="boost_asio.reference.buffer.buffers_and_scatter_gather_i_o"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.buffers_and_scatter_gather_i_o">Buffers
and Scatter-Gather I/O</a>
</h5>
<p>
</pre>
<h5>
<a name="boost_asio.reference.buffer.h5"></a>
- <span><a name="boost_asio.reference.buffer.requirements"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.requirements">Requirements</a>
+ <span class="phrase"><a name="boost_asio.reference.buffer.requirements"></a></span><a class="link" href="buffer.html#boost_asio.reference.buffer.requirements">Requirements</a>
</h5>
<p>
- <span class="bold"><strong>Header: </strong></span><code class="literal">boost/asio/buffer.hpp</code>
+ <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/buffer.hpp</code>
</p>
<p>
- <span class="bold"><strong>Convenience header: </strong></span><code class="literal">boost/asio.hpp</code>
+ <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2003-2012 Christopher M. Kohlhoff<p>
+<td align="right"><div class="copyright-footer">Copyright © 2003-2014 Christopher M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
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>)
</p>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="basic_waitable_timer/wait/overload2.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="buffer/overload1.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="basic_yield_context/operator_lb__rb_.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="buffer/overload1.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>