Namespaces
Variants

std::future_error:: operator=

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
future_error & operator = ( const future_error & other ) noexcept ;
(自 C++11 起)

将内容赋值为 other 的内容。如果 * this other 都具有动态类型 std::future_error ,则赋值后满足 std:: strcmp ( what ( ) , other. what ( ) ) == 0

参数

其他 - 用于赋值的另一个 future_error 对象

返回值

* this

示例