• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>allocate_stable</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 1. Boost.Beast">
8<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
9<link rel="prev" href="boost__beast__tcp_stream.html" title="tcp_stream">
10<link rel="next" href="boost__beast__bind_handler.html" title="bind_handler">
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="boost__beast__tcp_stream.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__bind_handler.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="beast.ref.boost__beast__allocate_stable"></a><a class="link" href="boost__beast__allocate_stable.html" title="allocate_stable">allocate_stable</a>
28</h4></div></div></div>
29<p>
30        <a class="indexterm" name="idm46057513533184"></a>
31      </p>
32<p>
33        Allocate a temporary object to hold stable asynchronous operation state.
34      </p>
35<h5>
36<a name="beast.ref.boost__beast__allocate_stable.h0"></a>
37        <span class="phrase"><a name="beast.ref.boost__beast__allocate_stable.synopsis"></a></span><a class="link" href="boost__beast__allocate_stable.html#beast.ref.boost__beast__allocate_stable.synopsis">Synopsis</a>
38      </h5>
39<p>
40        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/core/async_base.hpp" target="_top">boost/beast/core/async_base.hpp</a>&gt;</code>
41      </p>
42<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
43    <span class="keyword">class</span> <span class="identifier">State</span><span class="special">,</span>
44    <span class="keyword">class</span> <a href="../../../../../../doc/html/boost_asio/reference/Handler.html" target="_top"><span class="emphasis"><em>Handler</em></span></a><span class="special">,</span>
45    <span class="keyword">class</span> <a href="../../../../../../doc/html/boost_asio/reference/Executor1.html" target="_top"><span class="emphasis"><em>Executor1</em></span></a><span class="special">,</span>
46    <span class="keyword">class</span> <a href="https://en.cppreference.com/w/cpp/named_req/Allocator" target="_top"><span class="emphasis"><em>Allocator</em></span></a><span class="special">,</span>
47    <span class="keyword">class</span><span class="special">...</span> <span class="identifier">Args</span><span class="special">&gt;</span>
48<span class="identifier">State</span><span class="special">&amp;</span>
49<span class="identifier">allocate_stable</span><span class="special">(</span>
50    <span class="identifier">stable_async_base</span><span class="special">&lt;</span> <span class="identifier">Handler</span><span class="special">,</span> <span class="identifier">Executor1</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;&amp;</span> <span class="identifier">base</span><span class="special">,</span>
51    <span class="identifier">Args</span><span class="special">&amp;&amp;...</span> <span class="identifier">args</span><span class="special">);</span>
52</pre>
53<h5>
54<a name="beast.ref.boost__beast__allocate_stable.h1"></a>
55        <span class="phrase"><a name="beast.ref.boost__beast__allocate_stable.description"></a></span><a class="link" href="boost__beast__allocate_stable.html#beast.ref.boost__beast__allocate_stable.description">Description</a>
56      </h5>
57<p>
58        The object will be destroyed just before the completion handler is invoked,
59        or when the base is destroyed.
60      </p>
61<h5>
62<a name="beast.ref.boost__beast__allocate_stable.h2"></a>
63        <span class="phrase"><a name="beast.ref.boost__beast__allocate_stable.template_parameters"></a></span><a class="link" href="boost__beast__allocate_stable.html#beast.ref.boost__beast__allocate_stable.template_parameters">Template
64        Parameters</a>
65      </h5>
66<div class="informaltable"><table class="table">
67<colgroup>
68<col>
69<col>
70</colgroup>
71<thead><tr>
72<th>
73                <p>
74                  Type
75                </p>
76              </th>
77<th>
78                <p>
79                  Description
80                </p>
81              </th>
82</tr></thead>
83<tbody><tr>
84<td>
85                <p>
86                  <code class="computeroutput"><span class="identifier">State</span></code>
87                </p>
88              </td>
89<td>
90                <p>
91                  The type of object to allocate.
92                </p>
93              </td>
94</tr></tbody>
95</table></div>
96<h5>
97<a name="beast.ref.boost__beast__allocate_stable.h3"></a>
98        <span class="phrase"><a name="beast.ref.boost__beast__allocate_stable.parameters"></a></span><a class="link" href="boost__beast__allocate_stable.html#beast.ref.boost__beast__allocate_stable.parameters">Parameters</a>
99      </h5>
100<div class="informaltable"><table class="table">
101<colgroup>
102<col>
103<col>
104</colgroup>
105<thead><tr>
106<th>
107                <p>
108                  Name
109                </p>
110              </th>
111<th>
112                <p>
113                  Description
114                </p>
115              </th>
116</tr></thead>
117<tbody>
118<tr>
119<td>
120                <p>
121                  <code class="computeroutput"><span class="identifier">base</span></code>
122                </p>
123              </td>
124<td>
125                <p>
126                  The helper to allocate from.
127                </p>
128              </td>
129</tr>
130<tr>
131<td>
132                <p>
133                  <code class="computeroutput"><span class="identifier">args</span></code>
134                </p>
135              </td>
136<td>
137                <p>
138                  An optional list of parameters to forward to the constructor of
139                  the object being allocated.
140                </p>
141              </td>
142</tr>
143</tbody>
144</table></div>
145<h5>
146<a name="beast.ref.boost__beast__allocate_stable.h4"></a>
147        <span class="phrase"><a name="beast.ref.boost__beast__allocate_stable.see_also"></a></span><a class="link" href="boost__beast__allocate_stable.html#beast.ref.boost__beast__allocate_stable.see_also">See
148        Also</a>
149      </h5>
150<p>
151        <a class="link" href="boost__beast__stable_async_base.html" title="stable_async_base"><code class="computeroutput"><span class="identifier">stable_async_base</span></code></a>
152      </p>
153</div>
154<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
155<td align="left"></td>
156<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
157      Falco<p>
158        Distributed under the Boost Software License, Version 1.0. (See accompanying
159        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>)
160      </p>
161</div></td>
162</tr></table>
163<hr>
164<div class="spirit-nav">
165<a accesskey="p" href="boost__beast__tcp_stream.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__bind_handler.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
166</div>
167</body>
168</html>
169