73 lines
4.4 KiB
HTML
73 lines
4.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>operator==(std::filesystem::file_status)</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_filesystem_file_status_operator skin-cppreference2 action-view cpp-navbar">
|
|
<div id="cpp-content-base">
|
|
<div id="content"><a id="top"></a>
|
|
<h1 id="firstHeading" class="firstHeading">operator==<small>(std::filesystem::file_status)</small></h1>
|
|
<div id="bodyContent">
|
|
<div id="contentSub"><span class="subpages">< <a href="cpp.html">cpp</a>‎ | <a href="cpp-filesystem.html">filesystem</a>‎ | <a href="cpp-filesystem-file_status.html">file status</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-cxx20">
|
|
<td>
|
|
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">bool</span> operator<span class="sy1">==</span><span class="br0">(</span> <span class="kw4">const</span> file_status<span class="sy3">&</span> lhs, <span class="kw4">const</span> file_status<span class="sy3">&</span> rhs <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 起)</span></td>
|
|
</tr>
|
|
<tr class="t-dcl-sep">
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>检查二个 <code>file_status</code> 值是否相等,即是否其所表示的类型与权限分别相同。</p>
|
|
<p>此函数对通常<a href="cpp-language-unqualified_lookup.html">无限定</a>或<a href="cpp-language-qualified_lookup.html">有限定查找</a>不可见,而只能在 <code>std::filesystem::file_status</code> 为参数的关联类时由<a href="cpp-language-adl.html">实参依赖查找</a>找到。</p>
|
|
<p><code>!=</code> 运算符从 <code>operator==</code> <a href="cpp-language-operators.html#.E5.85.B3.E7.B3.BB.E8.BF.90.E7.AE.97.E7.AC.A6">合成</a>。</p>
|
|
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">参数</span></h3>
|
|
<table class="t-par-begin">
|
|
<tr class="t-par">
|
|
<td>lhs, rhs</td>
|
|
<td>-</td>
|
|
<td>要比较的 <code>file_status</code> 值</td>
|
|
</tr>
|
|
</table>
|
|
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">返回值</span></h3>
|
|
<p><span class="t-c"><span class="mw-geshi cpp source-cpp">lhs.<span class="me1">type</span><span class="br0">(</span><span class="br0">)</span> <span class="sy1">==</span> rhs.<span class="me1">type</span><span class="br0">(</span><span class="br0">)</span> <span class="sy3">&&</span> lhs.<span class="me1">permissions</span><span class="br0">(</span><span class="br0">)</span> <span class="sy1">==</span> rhs.<span class="me1">permissions</span><span class="br0">(</span><span class="br0">)</span></span></span></p>
|
|
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</span></h3>
|
|
<table class="t-dsc-begin">
|
|
<tr class="t-dsc">
|
|
<td>
|
|
<div class="t-dsc-member-div">
|
|
<div><a href="cpp-filesystem-file_status-type.html"><span class="t-lines"><span>type</span></span></a></div>
|
|
</div>
|
|
</td>
|
|
<td>获取或设置文件类型<br />
|
|
<span class="t-mark">(公开成员函数)</span></td>
|
|
</tr>
|
|
<tr class="t-dsc">
|
|
<td>
|
|
<div class="t-dsc-member-div">
|
|
<div><a href="cpp-filesystem-file_status-permissions.html"><span class="t-lines"><span>permissions</span></span></a></div>
|
|
</div>
|
|
</td>
|
|
<td>获取或设置文件权限<br />
|
|
<span class="t-mark">(公开成员函数)</span></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|