std::future_error::future_error
来自cppreference.com
< cpp | thread | 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 的公开构造函数,而一些实现提供这种构造函数。