名前空間
変種
操作

std::future<T>::future

提供: cppreference.com
< cpp‎ | thread‎ | future
 
 
スレッドサポートライブラリ
スレッド
(C++11)
(C++20)
(C++20)
this_thread 名前空間
(C++11)
(C++11)
(C++11)
相互排他
(C++11)
汎用ロック管理
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
条件変数
(C++11)
セマフォ
ラッチとバリア
(C++20)
(C++20)
フューチャー
(C++11)
(C++11)
(C++11)
(C++11)
 
 
future() noexcept;
(1) (C++11以上)
future( future&& other ) noexcept;
(2) (C++11以上)
future( const future& other ) = delete;
(3) (C++11以上)

std::future オブジェクトを構築します。

1) デフォルトコンストラクタ。 共有状態を持たない std::future を構築します。 構築後、 valid() == false になります。
2) ムーブコンストラクタ。 ムーブセマンティクスを用いて other の共有状態を持つ std::future を構築します。 構築後、 other.valid() == false になります。
3) std::futureCopyConstructible ではありません。

[編集] 引数

other - 共有状態を取得する別の std::future