std::future_error:: future_error
From cppreference.net
<
cpp
|
thread
|
future error
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::future_error
| Member functions | ||||
|
future_error::future_error
|
||||
|
future_error
(
const
future_error
&
other
)
noexcept
;
|
(1) | (自 C++11 起) |
|
explicit
future_error
(
std::
future_errc
ec
)
;
|
(2) | (自 C++17 起) |
1)
复制构造函数。使用
other
的内容初始化新
future_error
对象的内容。如果
*
this
和
other
都具有动态类型
std::future_error
,则满足
std::
strcmp
(
what
(
)
, other.
what
(
)
)
==
0
。
参数
| other | - |
用于复制的另一个
future_error
对象
|
| ec | - | 错误代码 |
注释
在 C++17 之前,除了通过复制另一个
future_error
对象外,用户没有符合标准的方法来构造
future_error
。C++11 和 C++14 描述了一个仅用于说明的公开构造函数,该构造函数接受一个
std::error_code
,部分实现提供了这样的构造函数。