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

58 lines
3.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>std::make_error_code(std::errc)</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_error_errc_make_error_code 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>make_error_code<span style="font-size:0.7em; line-height:130%">(std::errc)</span></h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="cpp.html">cpp</a>&lrm; | <a href="cpp-error.html">error</a>&lrm; | <a href="cpp-error-errc.html">errc</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-system_error.html">&lt;system_error&gt;</a></code></div>
</td>
<td></td>
<td></td>
</tr>
<tr class="t-dcl t-since-cxx11">
<td>
<div><span class="mw-geshi cpp source-cpp"><a href="cpp-error-error_code.html"><span class="kw877">std::<span class="me2">error_code</span></span></a> make_error_code<span class="br0">(</span> <a href="cpp-error-errc.html"><span class="kw880">std::<span class="me2">errc</span></span></a> e <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-cxx11">(C++11 &#36215;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#20026; errc &#26522;&#20030; <code>e</code> &#21019;&#24314; error_code &#20540;&#12290;</p>
<p>&#31561;&#20215;&#20110; <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="cpp-error-error_code.html"><span class="kw877">std::<span class="me2">error_code</span></span></a><span class="br0">(</span><span class="kw1">static_cast</span><span class="sy1">&lt;</span><span class="kw4">int</span><span class="sy1">&gt;</span><span class="br0">(</span>e<span class="br0">)</span>, <a href="cpp-error-generic_category.html"><span class="kw872">std::<span class="me2">generic_category</span></span></a><span class="br0">(</span><span class="br0">)</span><span class="br0">)</span></span></span></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>e</td>
<td>-</td>
<td>&#35201;&#20026;&#20043;&#21019;&#24314; error_code &#30340;&#38169;&#35823;&#30721;&#26522;&#20030;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E8.BF.94.E5.9B.9E.E5.80.BC">&#36820;&#22238;&#20540;</span></h3>
<p>&#23545;&#24212; <code>e</code> &#30340;&#38169;&#35823;&#30721;&#12290;</p>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>