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

67 lines
5.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>C++ &#20855;&#21517;&#35201;&#27714;&#65306;&#21487;&#26512;&#26500; (Destructible)</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_named_req_Destructible 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%">C++ &#20855;&#21517;&#35201;&#27714;&#65306;</span><span style="font-style:italic">&#21487;&#26512;&#26500;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Destructible)</span></h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-named_req.html">named req</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<p>&#25351;&#23450;&#35813;&#31867;&#22411;&#30340;&#23454;&#20363;&#21487;&#34987;&#26512;&#26500;&#12290;</p>
<h3><span class="mw-headline" id=".E8.A6.81.E6.B1.82">&#35201;&#27714;</span></h3>
<p>&#20197;&#19979;&#24773;&#20917;&#19979;&#65292;&#31867;&#22411; <code>T</code> &#28385;&#36275;<span style="font-style:italic">&#21487;&#26512;&#26500;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Destructible)</span> &#65306;</p>
<p>&#32473;&#23450;</p>
<ul>
<li><code>T</code> &#31867;&#22411;&#30340;&#34920;&#36798;&#24335; <code>u</code></li>
</ul>
<p>&#21017;&#19979;&#21015;&#34920;&#36798;&#24335;&#24517;&#39035;&#21512;&#27861;&#19988;&#25317;&#26377;&#20854;&#25351;&#23450;&#30340;&#25928;&#26524;</p>
<table class="wikitable">
<tr>
<th>&#34920;&#36798;&#24335;</th>
<th>&#21518;&#26465;&#20214;</th>
</tr>
<tr>
<td><span class="t-c"><span class="mw-geshi cpp source-cpp">u.~T<span class="br0">(</span><span class="br0">)</span></span></span></td>
<td><code>u</code> &#25152;&#25317;&#26377;&#30340;&#20840;&#37096;&#36164;&#28304;&#37117;&#24471;&#21040;&#22238;&#25910;&#65292;&#19981;&#25243;&#24322;&#24120;&#12290;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E6.B3.A8.E8.A7.A3">&#27880;&#35299;</span></h3>
<p>&#22312;<a href="cpp-language-lifetime.html">&#23545;&#35937;&#29983;&#23384;&#26399;</a>&#32467;&#26463;&#65288;&#20363;&#22914;&#22312;&#31163;&#24320;<a href="cpp-language-scope.html">&#20316;&#29992;&#22495;</a>&#26102;&#25110;&#30001;&#20110; <a href="cpp-language-delete.html">delete &#34920;&#36798;&#24335;</a>&#65289;&#26102;&#38544;&#24335;&#35843;&#29992;&#26512;&#26500;&#20989;&#25968;&#12290;&#22914;&#31867;&#22411;&#35201;&#27714;&#34920;&#20013;&#25152;&#31034;&#30340;&#26174;&#24335;&#26512;&#26500;&#20989;&#25968;&#35843;&#29992;&#26159;&#32597;&#35265;&#30340;&#12290;</p>
<p>&#25308;<a href="cpp-language-operator_member_access.html#.E5.86.85.E5.BB.BA.E7.9A.84.E6.88.90.E5.91.98.E8.AE.BF.E9.97.AE.E8.BF.90.E7.AE.97.E7.AC.A6">&#20266;&#26512;&#26500;&#20989;&#25968;&#35843;&#29992;</a>&#25152;&#36176;&#65292;&#25152;&#26377;&#26631;&#37327;&#31867;&#22411;&#37117;&#28385;&#36275;<span style="font-style:italic">&#21487;&#26512;&#26500;</span> <span style="font-family: Georgia, &#39;DejaVu Serif&#39;, serif; font-style:italic">(Destructible)</span> &#30340;&#35201;&#27714;&#65292;&#32780;&#25968;&#32452;&#31867;&#22411;&#21644;&#24341;&#29992;&#31867;&#22411;&#21017;&#19981;&#28385;&#36275;&#12290;&#27880;&#24847; <span class="t-lc"><a href="cpp-types-is_destructible.html">std::is_destructible</a></span> &#20801;&#35768;&#25968;&#32452;&#19982;&#24341;&#29992;&#31867;&#22411;&#12290;</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-types-is_destructible.html"><span class="t-lines"><span>is_destructible</span><span>is_trivially_destructible</span><span>is_nothrow_destructible</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span><span><span class="t-mark-rev t-since-cxx11">(C++11)</span></span></span></div>
</div>
</td>
<td>&#26816;&#26597;&#31867;&#22411;&#26159;&#21542;&#25317;&#26377;&#26410;&#34987;&#24323;&#32622;&#30340;&#26512;&#26500;&#20989;&#25968;<br />
<span class="t-mark">(&#31867;&#27169;&#26495;)</span></td>
</tr>
<tr class="t-dsc">
<td>
<div class="t-dsc-member-div">
<div><a href="cpp-concepts-destructible.html"><span class="t-lines"><span>destructible</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div>
</div>
</td>
<td>&#25351;&#23450;&#33021;&#38144;&#27585;&#35813;&#31867;&#22411;&#30340;&#23545;&#35937;<br />
<span class="t-mark">(&#27010;&#24565;)</span></td>
</tr>
</table>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>