std::promise<R>:: promise
From cppreference.net
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::promise
| Member functions | ||||
|
promise::promise
|
||||
| Getting the result | ||||
| Setting the result | ||||
| Non-member Functions | ||||
| Helper Classes | ||||
|
promise
(
)
;
|
(1) | (C++11以降) |
|
template
<
class
Alloc
>
promise ( std:: allocator_arg_t , const Alloc & alloc ) ; |
(2) | (C++11以降) |
|
promise
(
promise
&&
other
)
noexcept
;
|
(3) | (C++11以降) |
|
promise
(
const
promise
&
other
)
=
delete
;
|
(4) | (C++11以降) |
promise
オブジェクトを構築します。
1)
デフォルトコンストラクタ。空の共有状態でpromiseを構築します。
3)
ムーブコンストラクタ。
other
の共有状態をムーブセマンティクスを使用して構築します。構築後、
other
は共有状態を持ちません。
4)
promise
はコピー不可です。
パラメータ
| alloc | - | 共有状態の割り当てに使用するアロケータ |
| other | - |
状態を取得する別の
promise
|
例外
1,2)
実装定義の例外をスローする可能性があります。
例
|
このセクションは不完全です
理由: 例がありません |