Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / beast / doc / html / beast / ref / boost__beast__static_buffer_base / prepare.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>static_buffer_base::prepare</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="Chapter&#160;1.&#160;Boost.Beast">
8 <link rel="up" href="../boost__beast__static_buffer_base.html" title="static_buffer_base">
9 <link rel="prev" href="mutable_data_type.html" title="static_buffer_base::mutable_data_type">
10 <link rel="next" href="size.html" title="static_buffer_base::size">
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="mutable_data_type.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__static_buffer_base.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="size.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h5 class="title">
27 <a name="beast.ref.boost__beast__static_buffer_base.prepare"></a><a class="link" href="prepare.html" title="static_buffer_base::prepare">static_buffer_base::prepare</a>
28 </h5></div></div></div>
29 <p>
30           <a class="indexterm" name="idm45873481828336"></a>
31 Returns a mutable buffer sequence representing
32           writable bytes.
33         </p>
34 <h6>
35 <a name="beast.ref.boost__beast__static_buffer_base.prepare.h0"></a>
36           <span class="phrase"><a name="beast.ref.boost__beast__static_buffer_base.prepare.synopsis"></a></span><a class="link" href="prepare.html#beast.ref.boost__beast__static_buffer_base.prepare.synopsis">Synopsis</a>
37         </h6>
38 <pre class="programlisting"><span class="identifier">mutable_buffers_type</span>
39 <span class="identifier">prepare</span><span class="special">(</span>
40     <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n</span><span class="special">);</span>
41 </pre>
42 <h6>
43 <a name="beast.ref.boost__beast__static_buffer_base.prepare.h1"></a>
44           <span class="phrase"><a name="beast.ref.boost__beast__static_buffer_base.prepare.description"></a></span><a class="link" href="prepare.html#beast.ref.boost__beast__static_buffer_base.prepare.description">Description</a>
45         </h6>
46 <p>
47           Returns a mutable buffer sequence representing the writable bytes containing
48           exactly <code class="computeroutput"><span class="identifier">n</span></code> bytes of storage.
49           Memory may be reallocated as needed. All buffers sequences previously obtained
50           using <a class="link" href="../boost__beast__static_buffer/data.html" title="static_buffer::data"><code class="computeroutput"><span class="identifier">static_buffer</span><span class="special">::</span><span class="identifier">data</span></code></a> or <a class="link" href="../boost__beast__static_buffer/prepare.html" title="static_buffer::prepare"><code class="computeroutput"><span class="identifier">static_buffer</span><span class="special">::</span><span class="identifier">prepare</span></code></a> are invalidated.
51         </p>
52 <h6>
53 <a name="beast.ref.boost__beast__static_buffer_base.prepare.h2"></a>
54           <span class="phrase"><a name="beast.ref.boost__beast__static_buffer_base.prepare.parameters"></a></span><a class="link" href="prepare.html#beast.ref.boost__beast__static_buffer_base.prepare.parameters">Parameters</a>
55         </h6>
56 <div class="informaltable"><table class="table">
57 <colgroup>
58 <col>
59 <col>
60 </colgroup>
61 <thead><tr>
62 <th>
63                   <p>
64                     Name
65                   </p>
66                 </th>
67 <th>
68                   <p>
69                     Description
70                   </p>
71                 </th>
72 </tr></thead>
73 <tbody><tr>
74 <td>
75                   <p>
76                     <code class="computeroutput"><span class="identifier">n</span></code>
77                   </p>
78                 </td>
79 <td>
80                   <p>
81                     The desired number of bytes in the returned buffer sequence.
82                   </p>
83                 </td>
84 </tr></tbody>
85 </table></div>
86 <h6>
87 <a name="beast.ref.boost__beast__static_buffer_base.prepare.h3"></a>
88           <span class="phrase"><a name="beast.ref.boost__beast__static_buffer_base.prepare.exceptions"></a></span><a class="link" href="prepare.html#beast.ref.boost__beast__static_buffer_base.prepare.exceptions">Exceptions</a>
89         </h6>
90 <div class="informaltable"><table class="table">
91 <colgroup>
92 <col>
93 <col>
94 </colgroup>
95 <thead><tr>
96 <th>
97                   <p>
98                     Type
99                   </p>
100                 </th>
101 <th>
102                   <p>
103                     Thrown On
104                   </p>
105                 </th>
106 </tr></thead>
107 <tbody><tr>
108 <td>
109                   <p>
110                     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">length_error</span></code>
111                   </p>
112                 </td>
113 <td>
114                   <p>
115                     if <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span>
116                     <span class="special">+</span> <span class="identifier">n</span></code>
117                     exceeds <code class="computeroutput"><span class="identifier">max_size</span><span class="special">()</span></code>.
118                   </p>
119                 </td>
120 </tr></tbody>
121 </table></div>
122 <h6>
123 <a name="beast.ref.boost__beast__static_buffer_base.prepare.h4"></a>
124           <span class="phrase"><a name="beast.ref.boost__beast__static_buffer_base.prepare.exception_safety"></a></span><a class="link" href="prepare.html#beast.ref.boost__beast__static_buffer_base.prepare.exception_safety">Exception
125           Safety</a>
126         </h6>
127 <p>
128           Strong guarantee.
129         </p>
130 </div>
131 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
132 <td align="left"></td>
133 <td align="right"><div class="copyright-footer">Copyright &#169; 2016-2019 Vinnie
134       Falco<p>
135         Distributed under the Boost Software License, Version 1.0. (See accompanying
136         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>)
137       </p>
138 </div></td>
139 </tr></table>
140 <hr>
141 <div class="spirit-nav">
142 <a accesskey="p" href="mutable_data_type.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__static_buffer_base.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="size.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
143 </div>
144 </body>
145 </html>