Namespaces
Variants

std:: make_error_condition (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_condition
Helper classes
定义于头文件 <future>
std:: error_condition make_error_condition ( std:: future_errc e ) ;
(C++11 起)

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

std:: error_condition ( static_cast < int > ( e ) , std:: future_category ( ) )

目录

参数

e - 错误代码编号

返回值

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

示例

参阅

保存可移植错误代码
(类)
标识 future 错误代码
(枚举)