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

73 lines
6.1 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>operator==, operator&lt;=&gt;(std::stacktrace_entry)</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_stacktrace_entry_operator_cmp skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading">operator==, operator&lt;=&gt;<small>(std::stacktrace_entry)</small></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-stacktrace_entry.html">stacktrace entry</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="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">==</span><span class="br0">(</span> <span class="kw4">const</span> stacktrace_entry<span class="sy3">&amp;</span> lhs,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">const</span> stacktrace_entry<span class="sy3">&amp;</span> rhs <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-cxx23">(C++23 &#36215;)</span></td>
</tr>
<tr class="t-dcl t-since-cxx23">
<td>
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> std<span class="sy4">::</span><span class="me2">strong_ordering</span><br />
&nbsp; &nbsp; operator<span class="sy1">&lt;=&gt;</span><span class="br0">(</span> <span class="kw4">const</span> stacktrace_entry<span class="sy3">&amp;</span> lhs, <span class="kw4">const</span> stacktrace_entry<span class="sy3">&amp;</span> rhs <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-cxx23">(C++23 &#36215;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<div class="t-li1"><span class="t-li">1)</span> &#27604;&#36739; <code>lhs</code> &#19982; <code>rhs</code> &#30340;&#30456;&#31561;&#24615;&#12290;&#20108;&#20010; <code>stacktrace_entry</code> &#20540;&#30456;&#31561;&#24403;&#19988;&#20165;&#24403;&#23427;&#20204;&#34920;&#31034;&#21516;&#19968;&#26632;&#36394;&#26465;&#30446;&#65292;&#25110;&#22343;&#20026;&#31354;&#12290;</div>
<div class="t-li1"><span class="t-li">2)</span> &#33719;&#21462; <code>lhs</code> &#19982; <code>rhs</code> &#22312;&#30340;&#25152;&#26377; <code>stacktrace_entry</code> &#20540;&#19978;&#30340;&#26410;&#25351;&#23450;&#30340;&#20005;&#26684;&#20840;&#24207;&#20013;&#30340;&#30456;&#23545;&#39034;&#24207;&#65292;&#35813;&#24207;&#19982; <code>operator==</code> &#25152;&#24314;&#31435;&#30340;&#31561;&#20215;&#20851;&#31995;&#19968;&#33268;&#12290;</div>
<p>&#36825;&#20123;&#20989;&#25968;&#23545;&#36890;&#24120;<a href="cpp-language-unqualified_lookup.html">&#26080;&#38480;&#23450;</a>&#25110;<a href="cpp-language-qualified_lookup.html">&#26377;&#38480;&#23450;&#26597;&#25214;</a>&#19981;&#21487;&#35265;&#65292;&#32780;&#21482;&#33021;&#22312; <code>std::stacktrace_entry</code> &#20026;&#21442;&#25968;&#30340;&#20851;&#32852;&#31867;&#26102;&#30001;<a href="cpp-language-adl.html">&#23454;&#21442;&#20381;&#36182;&#26597;&#25214;</a>&#25214;&#21040;&#12290;</p>
<p><code>&lt;</code>&#12289; <code>&lt;=</code>&#12289; <code>&gt;</code>&#12289; <code>&gt;=</code> &#21450; <code>!=</code> &#36816;&#31639;&#31526;&#20998;&#21035;&#20174; <code>operator&lt;=&gt;</code> &#19982; <code>operator==</code> <a href="cpp-language-operators.html#.E5.85.B3.E7.B3.BB.E8.BF.90.E7.AE.97.E7.AC.A6">&#21512;&#25104;</a>&#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>lhs, rhs</td>
<td>-</td>
<td>&#35201;&#27604;&#36739;&#30340; <code>stacktrace_entry</code> &#20540;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<div class="t-li1"><span class="t-li">1)</span> &#33509; <code>lhs</code> &#19982; <code>rhs</code> &#27604;&#36739;&#30456;&#31561;&#21017;&#20026; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw2">true</span></span></span> &#65292;&#21542;&#21017;&#20026; <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw2">false</span></span></span> &#12290;</div>
<div class="t-li1"><span class="t-li">2)</span> &#33509; <code>lhs</code> &#19982; <code>rhs</code> &#27604;&#36739;&#30456;&#31561;&#21017;&#20026; <span class="t-lc">std::strong_ordering::equal</span> &#12290;</div>
<div class="t-li1"><span class="t-li"></span> &#21542;&#21017;&#65292;&#33509; <code>lhs</code> &#22312;&#20005;&#26684;&#20840;&#24207;&#20013;&#39034;&#24207;&#20808;&#20110; <code>rhs</code> &#21017;&#20026; <span class="t-lc">std::strong_ordering::less</span> &#12290;</div>
<div class="t-li1"><span class="t-li"></span> &#21542;&#21017;&#20026; <span class="t-lc">std::strong_ordering::greater</span> &#65288;&#35813;&#24773;&#20917;&#19979; <code>rhs</code> &#22312;&#20005;&#26684;&#20840;&#24207;&#20013;&#39034;&#24207;&#20808;&#20110; <code>lhs</code> &#65289;&#12290;</div>
<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>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>