Namespaces
Variants

std::shared_future<T>:: shared_future

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
shared_future ( ) noexcept ;
(1) (C++11以降)
(2)
shared_future ( const shared_future & other ) ;
(C++11以降)
(C++17まで)
shared_future ( const shared_future & other ) noexcept ;
(C++17以降)
shared_future ( std:: future < T > && other ) noexcept ;
(3) (C++11以降)
shared_future ( shared_future && other ) noexcept ;
(4) (C++11以降)

shared_future を新しく構築します。

1) デフォルトコンストラクタ。空のshared futureを構築します。これは共有状態を参照せず、 valid ( ) == false となります。
2) 同じ共有状態(存在する場合)を参照するshared futureを構築します。これは other と同じ状態を参照します。
3,4) other が保持する共有状態を * this に転送する。構築後、 other. valid ( ) == false となり、 this - > valid ( ) は構築前に other. valid ( ) が返していた値と同じ値を返す。

パラメータ

other - 初期化に使用する別のfutureオブジェクト