Files
hustoj/web/cppreference-zh/chmhelp/cpp-utility-functional-move_only_function-swap.html
2025-08-01 12:57:54 +08:00

62 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>std::move_only_function&lt;R(Args...) cv ref noexcept(noex)&gt;::swap</title>
<link rel="stylesheet" href="ext.css" />
<link rel="stylesheet" href="site_modules.css" />
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_utility_functional_move_only_function_swap skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::move_only_function&lt;R(Args...) <i>cv</i> <i>ref</i> noexcept(<i>noex</i>)&gt;::</span>swap</h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-utility.html">utility</a>&lrm; | <a href="cpp-utility-functional.html">functional</a>&lrm; | <a href="cpp-utility-functional-move_only_function.html">move only function</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<table class="t-dcl-begin">
<tbody>
<tr class="t-dcl t-since-cxx23">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw4">void</span> swap<span class="br0">(</span> move_only_function<span class="sy3">&amp;</span> other <span class="br0">)</span> <span class="kw1">noexcept</span><span class="sy4">;</span></span></div>
</td>
<td class="t-dcl-nopad"></td>
<td><span class="t-mark-rev t-since-cxx23">(C++23 &#36215;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#20132;&#25442; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#19982; <code>other</code> &#23384;&#20648;&#30340;&#21487;&#35843;&#29992;&#23545;&#35937;&#12290;</p>
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">&#21442;&#25968;</span></h3>
<table class="t-par-begin">
<tr class="t-par">
<td>other</td>
<td>-</td>
<td>&#35201;&#19982;&#20043;&#20132;&#25442;&#23384;&#20648;&#30340;&#21487;&#35843;&#29992;&#23545;&#35937;&#30340;&#20989;&#25968;&#21253;&#35013;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<p>&#65288;&#26080;&#65289;</p>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">&#21442;&#38405;</span></h3>
<table class="t-dsc-begin">
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-utility-functional-function-swap.html"><span class="t-lines"><span>swap</span></span></a></div>
</div>
</td>
<td>&#20132;&#25442;&#20869;&#23481;<br />
<span class="t-mark">(<code>std::function&lt;R(Args...)&gt;</code> &#30340;&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>