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

226 lines
20 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::function&lt;R(Args...)&gt;::function</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_function_function 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::function&lt;R(Args...)&gt;::</span>function</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-function.html">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-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp">function<span class="br0">(</span><span class="br0">)</span> <span class="kw1">noexcept</span><span class="sy4">;</span></span></div>
</td>
<td>(1)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp">function<span class="br0">(</span> <a href="cpp-types-nullptr_t.html"><span class="kw102">std::<span class="me2">nullptr_t</span></span></a> <span class="br0">)</span> <span class="kw1">noexcept</span><span class="sy4">;</span></span></div>
</td>
<td>(2)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp">function<span class="br0">(</span> <span class="kw4">const</span> function<span class="sy3">&amp;</span> other <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td>(3)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span></td>
</tr>
</tbody>
<tbody class="t-dcl-rev t-dcl-rev-num">
<tr class="t-dcl-rev-aux">
<td></td>
<td rowspan="142">(4)</td>
<td></td>
</tr>
<tr class="t-dcl t-since-cxx11 t-until-cxx20">
<td>
<div><span class="mw-geshi cpp source-cpp">function<span class="br0">(</span> function<span class="sy3">&amp;&amp;</span> other <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td class="t-dcl-nopad"></td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span><br />
<span class="t-mark-rev t-until-cxx20">(C++20 &#21069;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td>
<div><span class="mw-geshi cpp source-cpp">function<span class="br0">(</span> function<span class="sy3">&amp;&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-cxx20">(C++20 &#36215;)</span></td>
</tr>
</tbody>
<tbody>
<tr class="t-dcl t-since-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> F <span class="sy1">&gt;</span><br />
function<span class="br0">(</span> F<span class="sy3">&amp;&amp;</span> f <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td>(5)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11 t-until-cxx17">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> Alloc <span class="sy1">&gt;</span><br />
function<span class="br0">(</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a>, <span class="kw4">const</span> Alloc<span class="sy3">&amp;</span> alloc <span class="br0">)</span> <span class="kw1">noexcept</span><span class="sy4">;</span></span></div>
</td>
<td>(6)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span><br />
<span class="t-mark-rev t-until-cxx17">(C++17 &#20013;&#31227;&#38500;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11 t-until-cxx17">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> Alloc <span class="sy1">&gt;</span><br /></span>
<p>function<span class="br0">(</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a>, <span class="kw4">const</span> Alloc<span class="sy3">&amp;</span> alloc,<br /></p>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="cpp-types-nullptr_t.html"><span class="kw102">std::<span class="me2">nullptr_t</span></span></a> <span class="br0">)</span> <span class="kw1">noexcept</span><span class="sy4">;</span></div>
</td>
<td>(7)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span><br />
<span class="t-mark-rev t-until-cxx17">(C++17 &#20013;&#31227;&#38500;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11 t-until-cxx17">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> Alloc <span class="sy1">&gt;</span><br /></span>
<p>function<span class="br0">(</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a>, <span class="kw4">const</span> Alloc<span class="sy3">&amp;</span> alloc,<br /></p>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">const</span> function<span class="sy3">&amp;</span> other <span class="br0">)</span><span class="sy4">;</span></div>
</td>
<td>(8)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span><br />
<span class="t-mark-rev t-until-cxx17">(C++17 &#20013;&#31227;&#38500;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11 t-until-cxx17">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> Alloc <span class="sy1">&gt;</span><br /></span>
<p>function<span class="br0">(</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a>, <span class="kw4">const</span> Alloc<span class="sy3">&amp;</span> alloc,<br /></p>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function<span class="sy3">&amp;&amp;</span> other <span class="br0">)</span><span class="sy4">;</span></div>
</td>
<td>(9)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span><br />
<span class="t-mark-rev t-until-cxx17">(C++17 &#20013;&#31227;&#38500;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx11 t-until-cxx17">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> F, <span class="kw1">class</span> Alloc <span class="sy1">&gt;</span><br />
function<span class="br0">(</span> <a href="cpp-memory-allocator_arg_t.html"><span class="kw702">std::<span class="me2">allocator_arg_t</span></span></a>, <span class="kw4">const</span> Alloc<span class="sy3">&amp;</span> alloc, F f <span class="br0">)</span><span class="sy4">;</span></span></div>
</td>
<td>(10)</td>
<td><span class="t-mark-rev t-since-cxx11">(C++11 &#36215;)</span><br />
<span class="t-mark-rev t-until-cxx17">(C++17 &#20013;&#31227;&#38500;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#20174;&#21508;&#31181;&#36164;&#28304;&#26500;&#36896; <code>std::function</code> &#12290;</p>
<div class="t-li1"><span class="t-li">1-2)</span> &#26500;&#36896;<i>&#31354;</i> <code>function</code> &#12290;</div>
<div class="t-li1"><span class="t-li">3-4)</span> &#22797;&#21046; <span class="t-v">(3)</span> &#25110;&#31227;&#21160; <span class="t-v">(4)</span> <code>other</code> &#30340;<i>&#30446;&#26631;</i>&#21040; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#30340;<i>&#30446;&#26631;</i>&#12290;&#33509; <code>other</code> &#20026;<i>&#31354;</i>&#65292;&#21017;&#35843;&#29992;&#21518; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#23558;&#20134;&#20026;<i>&#31354;</i>&#12290;&#23545;&#20110; <span class="t-v">(4)</span> &#65292; <code>other</code> &#22312;&#35843;&#29992;&#21518;&#22788;&#20110;&#21512;&#27861;&#20294;&#26410;&#25351;&#23450;&#30340;&#29366;&#24577;&#12290;</div>
<div class="t-li1"><span class="t-li">5)</span> &#20197; <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="cpp-utility-forward.html"><span class="kw1117">std::<span class="me2">forward</span></span></a><span class="sy1">&lt;</span>F<span class="sy1">&gt;</span><span class="br0">(</span>f<span class="br0">)</span></span></span> &#21021;&#22987;&#21270;<i>&#30446;&#26631;</i>&#12290;<i>&#30446;&#26631;</i>&#30340;&#31867;&#22411;&#20026; <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="cpp-types-decay.html"><span class="kw628">std::<span class="me2">decay</span></span></a><span class="sy1">&lt;</span>F<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">type</span></span></span> &#12290;&#33509; <code>f</code> &#26159;&#31354;&#25351;&#38024;&#12289;&#25351;&#21521;&#25104;&#21592;&#30340;&#31354;&#25351;&#38024;&#25110;&#26576; <code>std::function</code> &#29305;&#21270;&#30340;&#31354;&#20540;&#65292;&#21017; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#22312;&#27492;&#35843;&#29992;&#21518;&#23558;&#20026;<i>&#31354;</i>&#12290;&#27492;&#26500;&#36896;&#20989;&#25968;&#19981;&#21442;&#19982;&#37325;&#36733;&#20915;&#35758;&#65292;&#38500;&#38750;&#30446;&#26631;&#31867;&#22411;&#19982; <code>function</code> &#19981;&#30456;&#21516;&#65292;&#19988;&#20854;&#24038;&#20540;&#23545;&#21442;&#25968;&#31867;&#22411; <code>Args...</code> &#21644;&#36820;&#22238;&#31867;&#22411; <code>R</code> <a href="cpp-named_req-Callable.html"><span style="font-style:italic">&#21487;&#35843;&#29992;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Callable)</span></a> &#12290;&#33509;&#30446;&#26631;&#31867;&#22411;&#19981;&#21487;&#22797;&#21046;&#26500;&#36896;&#25110;&#30446;&#26631;&#30340;&#21021;&#22987;&#21270;&#38750;&#33391;&#26500;&#65292;&#21017;&#31243;&#24207;&#38750;&#33391;&#26500;&#12290;</div>
<div class="t-li1"><span class="t-li">6-10)</span> &#21516; <span class="t-v">(1-5)</span> &#65292;&#38500;&#20102;&#23558; <code>alloc</code> &#29992;&#20110;&#20998;&#37197;&#20219;&#20309; <code>function</code> &#20250;&#29992;&#21040;&#30340;&#20869;&#37096;&#25968;&#25454;&#32467;&#26500;&#30340;&#20869;&#23384;&#12290;</div>
<p><i>&#30446;&#26631;</i>&#26159;&#20989;&#25968;&#25351;&#38024;&#25110; <span class="t-lc"><a href="cpp-utility-functional-reference_wrapper.html">std::reference_wrapper</a></span> &#26102;&#65292;&#20445;&#35777;&#20351;&#29992;&#23567;&#23545;&#35937;&#20248;&#21270;&#65292;&#21363;&#22987;&#32456;&#30452;&#25509;&#23384;&#20648;&#36825;&#20123;&#30446;&#26631;&#20110; <span class="t-lc"><a href="cpp-utility-functional-function.html">std::function</a></span> &#23545;&#35937;&#20013;&#65292;&#19981;&#21457;&#29983;&#21160;&#24577;&#20869;&#23384;&#20998;&#37197;&#12290;&#21487;&#20197;&#26500;&#36896;&#20854;&#20182;&#22823;&#23545;&#35937;&#20110;&#21160;&#24577;&#20998;&#37197;&#30340;&#23384;&#20648;&#20013;&#65292;&#24182;&#30001; <span class="t-lc"><a href="cpp-utility-functional-function.html">std::function</a></span> &#23545;&#35937;&#36890;&#36807;&#25351;&#38024;&#35775;&#38382;&#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>&#29992;&#20110;&#21021;&#22987;&#21270; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#30340;&#20989;&#25968;&#23545;&#35937;</td>
</tr>
<tr class="t-par">
<td>f</td>
<td>-</td>
<td>&#29992;&#20110;&#21021;&#22987;&#21270; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span> &#30340;&#21487;&#35843;&#29992;&#23545;&#35937;</td>
</tr>
<tr class="t-par">
<td>alloc</td>
<td>-</td>
<td>&#29992;&#20110;&#20869;&#37096;&#20869;&#23384;&#20998;&#37197;&#30340;<a href="cpp-named_req-Allocator.html"><span style="font-style:italic">&#20998;&#37197;&#22120;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Allocator)</span></a></td>
</tr>
<tr class="t-par-hitem">
<td colspan="3">&#31867;&#22411;&#35201;&#27714;</td>
</tr>
<tr class="t-par-req">
<td colspan="3">-
<div class="spacer"></div>
<code><span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="cpp-types-decay.html"><span class="kw628">std::<span class="me2">decay</span></span></a><span class="sy1">&lt;</span>F<span class="sy1">&gt;</span><span class="sy4">::</span><span class="me2">type</span></span></span></code> &#24517;&#39035;&#28385;&#36275;<a href="cpp-named_req-Callable.html"><span style="font-style:italic">&#21487;&#35843;&#29992;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Callable)</span></a> &#21644; <a href="cpp-named_req-CopyConstructible.html"><span style="font-style:italic">&#21487;&#22797;&#21046;&#26500;&#36896;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(CopyConstructible)</span></a> &#30340;&#35201;&#27714;&#12290;</td>
</tr>
<tr class="t-par-req">
<td colspan="3">-
<div class="spacer"></div>
<code>Alloc</code> &#24517;&#39035;&#28385;&#36275;<a href="cpp-named_req-Allocator.html"><span style="font-style:italic">&#20998;&#37197;&#22120;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Allocator)</span></a> &#30340;&#35201;&#27714;&#12290;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E5.BC.82.E5.B8.B8">&#24322;&#24120;</span></h3>
<div class="t-li1"><span class="t-li">3,8,9)</span> &#33509; <code>other</code> &#30340;<i>&#30446;&#26631;</i>&#26159;&#20989;&#25968;&#25351;&#38024;&#25110; <span class="t-lc"><a href="cpp-utility-functional-reference_wrapper.html">std::reference_wrapper</a></span> &#21017;&#19981;&#25243;&#20986;&#24322;&#24120;&#65292;&#21542;&#21017;&#21487;&#33021;&#25243;&#20986; <span class="t-lc"><a href="cpp-memory-new-bad_alloc.html">std::bad_alloc</a></span> &#25110;&#29992;&#20110;&#22797;&#21046;&#25110;&#31227;&#21160;&#23384;&#20648;&#30340;&#21487;&#35843;&#29992;&#23545;&#35937;&#30340;&#26500;&#36896;&#20989;&#25968;&#25152;&#25243;&#30340;&#24322;&#24120;&#12290;</div>
<table class="t-rev-begin">
<tr class="t-rev t-until-cxx20">
<td>
<div class="t-li1"><span class="t-li">4)</span> &#33509; <code>other</code> &#30340;<i>&#30446;&#26631;</i>&#26159;&#20989;&#25968;&#25351;&#38024;&#25110; <span class="t-lc"><a href="cpp-utility-functional-reference_wrapper.html">std::reference_wrapper</a></span> &#21017;&#19981;&#25243;&#20986;&#24322;&#24120;&#65292;&#21542;&#21017;&#21487;&#33021;&#25243;&#20986; <span class="t-lc"><a href="cpp-memory-new-bad_alloc.html">std::bad_alloc</a></span> &#25110;&#29992;&#20110;&#22797;&#21046;&#25110;&#31227;&#21160;&#23384;&#20648;&#30340;&#21487;&#35843;&#29992;&#23545;&#35937;&#30340;&#26500;&#36896;&#20989;&#25968;&#25152;&#25243;&#30340;&#24322;&#24120;&#12290;</div>
</td>
<td><span class="t-mark-rev t-until-cxx20">(C++20 &#21069;)</span></td>
</tr>
</table>
<div class="t-li1"><span class="t-li">5,10)</span> &#33509; <code>f</code> &#26159;&#20989;&#25968;&#25351;&#38024;&#25110; <span class="t-lc"><a href="cpp-utility-functional-reference_wrapper.html">std::reference_wrapper</a></span> &#21017;&#19981;&#25243;&#24322;&#24120;&#65292;&#21542;&#21017;&#21487;&#33021;&#25243;&#20986; <span class="t-lc"><a href="cpp-memory-new-bad_alloc.html">std::bad_alloc</a></span> &#25110;&#23384;&#20648;&#30340;&#21487;&#35843;&#29992;&#23545;&#35937;&#30340;&#22797;&#21046;&#26500;&#36896;&#20989;&#25968;&#25152;&#25243;&#30340;&#24322;&#24120;&#12290;</div>
<h3><span class="mw-headline" id=".E6.B3.A8.E8.A7.A3">&#27880;&#35299;</span></h3>
<p><code>std::function</code> &#30340;&#20998;&#37197;&#22120;&#25903;&#25345;&#35828;&#26126;&#36139;&#20047;&#65292;&#19988;&#23454;&#29616;&#19981;&#19968;&#33268;&#12290;&#19968;&#20123;&#23454;&#29616;&#23436;&#20840;&#19981;&#25552;&#20379;&#37325;&#36733; <span class="t-v">(6-10)</span> &#65292;&#19968;&#20123;&#25552;&#20379;&#37325;&#36733;&#20294;&#24573;&#30053;&#25552;&#20379;&#30340;&#20998;&#37197;&#22120;&#21442;&#25968;&#65292;&#32780;&#19968;&#20123;&#23454;&#29616;&#25552;&#20379;&#37325;&#36733;&#24182;&#23558;&#25552;&#20379;&#30340;&#20998;&#37197;&#22120;&#29992;&#20110;&#26500;&#36896;&#65292;&#20294;&#19981;&#22312;&#37325;&#36171;&#20540; <code>std::function</code> &#26102;&#20351;&#29992;&#12290;&#32467;&#26524;&#65292; C++17 &#20013;&#31227;&#38500;&#20102;&#20998;&#37197;&#22120;&#25903;&#25345;&#12290;</p>
<h3><span class="mw-headline" id=".E7.A4.BA.E4.BE.8B">&#31034;&#20363;</span></h3>
<table class="metadata plainlinks ambox mbox-small-left ambox-notice" style="">
<tr>
<td class="mbox-empty-cell"></td>
<td class="mbox-text" style="">&#26412;&#33410;&#26410;&#23436;&#25104;<br />
&#21407;&#22240;&#65306;&#26242;&#26080;&#31034;&#20363;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E7.BC.BA.E9.99.B7.E6.8A.A5.E5.91.8A">&#32570;&#38519;&#25253;&#21578;</span></h3>
<p>&#19979;&#21015;&#26356;&#25913;&#34892;&#20026;&#30340;&#32570;&#38519;&#25253;&#21578;&#36861;&#28335;&#22320;&#24212;&#29992;&#20110;&#20197;&#21069;&#20986;&#29256;&#30340; C++ &#26631;&#20934;&#12290;</p>
<table class="dsctable" style="font-size:0.8em">
<tr>
<th>DR</th>
<th>&#24212;&#29992;&#20110;</th>
<th>&#20986;&#29256;&#26102;&#30340;&#34892;&#20026;</th>
<th>&#27491;&#30830;&#34892;&#20026;</th>
</tr>
<tr>
<td><a rel="nofollow" class="external text" href="https://cplusplus.github.io/LWG/issue2132">LWG 2132</a></td>
<td>C++11</td>
<td>&#25509;&#25910;&#19968;&#20010;<span style="font-style:italic">&#21487;&#35843;&#29992;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Callable)</span> &#23545;&#35937;&#30340;&#26500;&#36896;&#20989;&#25968;&#21487;&#33021;&#26377;&#27495;&#20041;</td>
<td>&#24050;&#32422;&#26463;</td>
</tr>
<tr>
<td><a rel="nofollow" class="external text" href="https://cplusplus.github.io/LWG/issue2774">LWG 2774</a></td>
<td>C++11</td>
<td>&#25509;&#25910;&#19968;&#20010;<span style="font-style:italic">&#21487;&#35843;&#29992;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Callable)</span> &#23545;&#35937;&#30340;&#20989;&#25968;&#36827;&#34892;&#19968;&#27425;&#39069;&#22806;&#31227;&#21160;</td>
<td>&#24050;&#28040;&#38500;</td>
</tr>
</table>
<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 t-dsc-member-nobold-div">
<div><a href="cpp-utility-functional-move_only_function-move_only_function.html"><span class="t-lines"><span>(&#26500;&#36896;&#20989;&#25968;)</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div>
</div>
</td>
<td>&#26500;&#36896;&#26032;&#30340; <code>std::move_only_function</code> &#23545;&#35937;<br />
<span class="t-mark">(<code>std::move_only_function&lt;R(Args...) <i>cv</i> <i>ref</i> noexcept(<i>noex</i>)&gt;</code> &#30340;&#20844;&#24320;&#25104;&#21592;&#20989;&#25968;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>