上传cppreference
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<!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::future_error::future_error</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_thread_future_error_future_error 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::future_error::</span>future_error</h1>
|
||||
<div id="bodyContent">
|
||||
<div id="contentSub"><span class="subpages">< <a href="cpp.html">cpp</a>‎ | <a href="cpp-thread.html">thread</a>‎ | <a href="cpp-thread-future_error.html">future error</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-cxx11">
|
||||
<td>
|
||||
<div><span class="mw-geshi cpp source-cpp">future_error<span class="br0">(</span> <span class="kw4">const</span> future_error<span class="sy3">&</span> other <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-cxx11">(C++11 起)</span></td>
|
||||
</tr>
|
||||
<tr class="t-dcl t-since-cxx17">
|
||||
<td>
|
||||
<div><span class="mw-geshi cpp source-cpp"><span class="kw1">explicit</span> future_error<span class="br0">(</span> <a href="cpp-thread-future_errc.html"><span class="kw2194">std::<span class="me2">future_errc</span></span></a> ec <span class="br0">)</span><span class="sy4">;</span></span></div>
|
||||
</td>
|
||||
<td>(2)</td>
|
||||
<td><span class="t-mark-rev t-since-cxx17">(C++17 起)</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> 复制构造函数,以 <code>other</code> 的内容初始化新 <code>future_error</code> 的内容。若 <code>*this</code> 与 <code>other</code> 均拥有动态类型 <code>std::future_error</code> 则 <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="cpp-string-byte-strcmp.html"><span class="kw1146">std::<span class="me2">strcmp</span></span></a><span class="br0">(</span>what<span class="br0">(</span><span class="br0">)</span>, other.<span class="me1">what</span><span class="br0">(</span><span class="br0">)</span><span class="br0">)</span> <span class="sy1">==</span> <span class="nu0">0</span></span></span> 。</div>
|
||||
<div class="t-li1"><span class="t-li">2)</span> 构造含错误码 <span class="t-c"><span class="mw-geshi cpp source-cpp">std<span class="sy4">::</span><span class="me2">make_error_code</span><span class="br0">(</span>ec<span class="br0">)</span></span></span> 的新 <code>future_error</code> 对象。</div>
|
||||
<h3><span class="mw-headline" id=".E5.8F.82.E6.95.B0">参数</span></h3>
|
||||
<table class="t-par-begin">
|
||||
<tr class="t-par">
|
||||
<td>other</td>
|
||||
<td>-</td>
|
||||
<td>要复制的另一 <code>future_error</code> 对象</td>
|
||||
</tr>
|
||||
<tr class="t-par">
|
||||
<td>ec</td>
|
||||
<td>-</td>
|
||||
<td>错误码</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3><span class="mw-headline" id=".E6.B3.A8.E8.A7.A3">注解</span></h3>
|
||||
<p>C++17 前用户没有符合标准的构造 <code>future_error</code> 的方法,除了从另一 <code>future_error</code> 复制。 C++11 与 C++14 描述了仅为说明的接收 <span class="t-lc"><a href="cpp-error-error_code.html">std::error_code</a></span> 的公开构造函数,而一些实现提供这种构造函数。</p>
|
||||
</div>
|
||||
<div class="visualClear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user