Namespaces
Variants

std:: make_error_code (std::future_errc)

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
std::future_errc
Non-member functions
make_error_code
Helper classes
定义于头文件 <future>
(C++11 起)

从类型为 std::error_code 的值构造一个 std::future_errc 对象,其方式类似于:

std:: error_code ( static_cast < int > ( e ) , std:: future_category ( ) ) .

当给定 std::error_code 参数时,该函数由 std::future_errc 的构造函数调用。

目录

参数

e - 错误代码编号

返回值

一个类型为 std::error_code 的值,该值持有来自 e 的错误码编号,关联的错误类别为 "future"

示例

参见

(C++11)
持有平台相关的错误代码
(类)
标识 future 错误代码
(枚举)
errc 枚举创建错误代码值 e
(函数)
构造 iostream 错误代码
(函数)