std::experimental:: promise (concurrency TS)
このページは、並行処理TSによって提供される改良された
std::future
をサポートする、並行処理TSによって提供される修正版
std::promise
について説明します。Library Fundamentals TSによって提供される型消去アロケータサポート付きの
promise
のバージョンについては、
std::experimental::fundamentals_v2::promise
を参照してください。
|
ヘッダーで定義
<experimental/future>
|
||
|
template
<
class
R
>
class
promise
;
|
(1) | (concurrency TS) |
|
template
<
class
R
>
class
promise
<
R
&
>
;
|
(2) | (concurrency TS) |
|
template
<>
class
promise
<
void
>
;
|
(3) | (concurrency TS) |
std::experimental::concurrency_v1::promise
は、並行性TSで提供される
std::promise
の修正版であり、
std::experimental::future
と連携するように設計されています。
std::promise
からの唯一の変更点は、
get_future()
メンバー関数が
std::
experimental
::
future
を返すことです。