Namespaces
Variants

std::future_error:: future_error

From ja.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 ( const future_error & other ) noexcept ;
(1) (C++11以降)
explicit future_error ( std:: future_errc ec ) ;
(2) (C++17以降)
1) コピーコンストラクタ。新しい future_error オブジェクトの内容を other の内容で初期化する。 * this と other の両方が動的型 std::future_error を持つ場合、 std:: strcmp ( what ( ) , other. what ( ) ) == 0 となる。
2) 新しい future_error オブジェクトを構築し、エラーコード std:: make_error_code ( ec ) を含む。

パラメータ

other - コピーする別の future_error オブジェクト
ec - エラーコード

注記

C++17より前では、ユーザーが別のfuture_errorからのコピー以外の方法でfuture_errorを構築する標準準拠の方法は存在しません。C++11とC++14では、std::error_codeを受け取る公開限定のコンストラクタが規定されており、一部の実装ではそのようなコンストラクタが提供されています。