Files
hustoj/web/cppreference-zh/chmhelp/cpp-coroutine-coroutine_handle-hash.html
2025-08-01 12:57:54 +08:00

70 lines
3.4 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::hash(std::coroutine_handle)</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_coroutine_coroutine_handle_hash 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::</span>hash<small>(std::coroutine_handle)</small></h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-coroutine.html">coroutine</a>&lrm; | <a href="cpp-coroutine-coroutine_handle.html">coroutine handle</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-dsc-header">
<td>
<div>&#23450;&#20041;&#20110;&#22836;&#25991;&#20214; <code><a href="cpp-header-coroutine.html">&lt;coroutine&gt;</a></code></div>
</td>
<td></td>
<td></td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> Promise <span class="sy1">&gt;</span><br />
<span class="kw1">struct</span> hash<span class="sy1">&lt;</span>std<span class="sy4">::</span><span class="me2">coroutine_handle</span><span class="sy1">&lt;</span>Promise<span class="sy1">&gt;&gt;</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>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p><span class="t-lc"><a href="cpp-utility-hash.html">std::hash</a></span> &#23545; <span class="t-lc">std::coroutine_handle</span> &#30340;&#27169;&#26495;&#29305;&#21270;&#20801;&#35768;&#29992;&#25143;&#33719;&#24471; <span class="t-c"><span class="mw-geshi cpp source-cpp">std<span class="sy4">::</span><span class="me2">coroutine_handle</span><span class="sy1">&lt;</span>P<span class="sy1">&gt;</span></span></span> &#23545;&#35937;&#30340;&#25955;&#21015;&#20540;&#12290;</p>
<p>&#29305;&#21270;&#30340; <code>operator()</code> &#20026; noexcept &#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=".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-hash.html"><span class="t-lines"><span>hash</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div>
</td>
<td>&#25955;&#21015;&#20989;&#25968;&#23545;&#35937;<br />
<span class="t-mark">(&#31867;&#27169;&#26495;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>