Insane_DNS/libraries/asio-1.28.1/doc/asio/reference/CancellationSlot.html

183 lines
9.1 KiB
HTML
Raw Permalink Normal View History

2023-10-24 21:59:30 -04:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cancellation slot requirements</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="CancellationHandler.html" title="Cancellation handler requirements">
<link rel="next" href="CompletionCondition.html" title="Completion condition requirements">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="CancellationHandler.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="CompletionCondition.html"><img src="../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="asio.reference.CancellationSlot"></a><a class="link" href="CancellationSlot.html" title="Cancellation slot requirements">Cancellation slot requirements</a>
</h3></div></div></div>
<p>
A type <code class="computeroutput"><span class="identifier">X</span></code> meets the <code class="computeroutput"><span class="identifier">CancellationSlot</span></code> requirements if it satisfies
the requirements of <code class="computeroutput"><span class="identifier">CopyConstructible</span></code>
(C++Std [copyconstructible]) and <code class="computeroutput"><span class="identifier">Destructible</span></code>
(C++Std [destructible]), as well as the additional requirements listed below.
</p>
<p>
In the table below, <code class="computeroutput"><span class="identifier">x1</span></code> and
<code class="computeroutput"><span class="identifier">x2</span></code> denote (possibly const)
values of type <code class="computeroutput"><span class="identifier">X</span></code>, <code class="computeroutput"><span class="identifier">mx1</span></code> denotes an xvalue of type <code class="computeroutput"><span class="identifier">X</span></code>, <code class="computeroutput"><span class="identifier">H</span></code>
denotes a type that satisfies <code class="computeroutput"><span class="identifier">CancellationHandler</span></code>,
<code class="computeroutput"><span class="identifier">h</span></code> denotes an xvalue of type
<code class="computeroutput"><span class="identifier">H</span></code>, and <code class="computeroutput"><span class="identifier">u0</span></code>
to <code class="computeroutput"><span class="identifier">uN</span></code> denote identifiers.
</p>
<div class="table">
<a name="asio.reference.CancellationSlot.t0"></a><p class="title"><b>Table 8. CancellationSlot requirements</b></p>
<div class="table-contents"><table class="table" summary="CancellationSlot requirements">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
expression
</p>
</th>
<th>
<p>
type
</p>
</th>
<th>
<p>
assertion/note<br> pre/post-conditions
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">X</span> <span class="identifier">u</span><span class="special">(</span><span class="identifier">x1</span><span class="special">);</span></code>
</p>
</td>
<td>
</td>
<td>
<p>
Shall not exit via an exception.<br> <br> post: <code class="computeroutput"><span class="identifier">u</span> <span class="special">==</span>
<span class="identifier">x1</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">X</span> <span class="identifier">u</span><span class="special">(</span><span class="identifier">mx1</span><span class="special">);</span></code>
</p>
</td>
<td>
</td>
<td>
<p>
Shall not exit via an exception.<br> <br> post: <code class="computeroutput"><span class="identifier">u</span></code> equals the prior value of
<code class="computeroutput"><span class="identifier">mx1</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">x1</span> <span class="special">==</span>
<span class="identifier">x2</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">bool</span></code>
</p>
</td>
<td>
<p>
Returns <code class="computeroutput"><span class="keyword">true</span></code> only
if <code class="computeroutput"><span class="identifier">x1</span></code> and <code class="computeroutput"><span class="identifier">x2</span></code> can be interchanged with identical
effects. <br> <code class="computeroutput"><span class="keyword">operator</span><span class="special">==</span></code> shall be reflexive, symmetric,
and transitive, and shall not exit via an exception.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">x1</span> <span class="special">!=</span>
<span class="identifier">x2</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="keyword">bool</span></code>
</p>
</td>
<td>
<p>
Same as <code class="computeroutput"><span class="special">!(</span><span class="identifier">x1</span>
<span class="special">==</span> <span class="identifier">x2</span><span class="special">)</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">x1</span><span class="special">.</span><span class="identifier">assign</span><span class="special">(</span><span class="identifier">h</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">H</span><span class="special">&amp;</span></code>
</p>
</td>
<td>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">x1</span><span class="special">.</span><span class="identifier">emplace</span><span class="special">&lt;</span><span class="identifier">H</span><span class="special">&gt;(</span><span class="identifier">u0</span><span class="special">,</span>
<span class="special">...,</span> <span class="identifier">uN</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">H</span><span class="special">&amp;</span></code>
</p>
</td>
<td>
<p>
Requires that <code class="computeroutput"><span class="identifier">is_constructible</span><span class="special">&lt;</span><span class="identifier">H</span><span class="special">,</span> <span class="keyword">decltype</span><span class="special">(</span><span class="identifier">u0</span><span class="special">),</span> <span class="special">...,</span>
<span class="keyword">decltype</span><span class="special">(</span><span class="identifier">u0</span><span class="special">)&gt;::</span><span class="identifier">value</span></code> be true.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<div class="copyright-footer">Copyright © 2003-2023 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>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="CancellationHandler.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="CompletionCondition.html"><img src="../../next.png" alt="Next"></a>
</div>
</body>
</html>