名前空間
変種
操作

std::experimental::promise (ライブラリの基礎 TS)

From cppreference.com
 
 
 
 
 

このページは、Library Fundamentals TSによって提供される、型消去アロケータサポートを備えたstd::promiseの変更版について説明しています。このTSによって行われたstd::futureの改善をサポートする、並行処理TSによって提供されるpromiseのバージョンについては、std::experimental::concurrency_v1::promiseを参照してください。

ヘッダ<experimental/future>で定義
template< class R > class promise;
(1) (Library Fundamentals TS)
template< class R > class promise<R&>;
(2) (Library Fundamentals TS)
template<>          class promise<void>;
(3) (Library Fundamentals TS)

std::experimental::fundamentals_v1::promise(およびstd::experimental::fundamentals_v2::promise)は、型消去アロケータのサポートを備えたライブラリの基礎TSによって提供される、std::promiseの変更版です。

目次

[編集] メンバ型

メンバ型 定義
allocator_type std::experimental::erased_type

[編集] メンバ関数

promiseオブジェクトを構築する
(public member function) [編集]
このオブジェクトがメモリを割り当てるために使用するメモリリソースへのポインタを取得します
(public member function) [編集]

[編集] 非メンバ関数

swapアルゴリズムを特殊化する
(function template) [編集]

[編集] ヘルパークラス

std::uses_allocator 型特性を特殊化する
(class template specialization) [編集]

std::promise と同一のメンバ

メンバ関数

promise オブジェクトを破棄します
(public member function of std::promise<R>) [編集]
共有状態を代入します
(public member function of std::promise<R>) [編集]
2つのpromiseオブジェクトを入れ替える
(public member function of std::promise<R>) [編集]
結果の取得
約束された結果に関連付けられたfutureを返します
(public member function of std::promise<R>) [編集]
結果の設定
結果を特定の値に設定する
(public member function of std::promise<R>) [編集]
スレッド終了時のみ通知を配信し、結果を特定の値に設定する
(public member function of std::promise<R>) [編集]
結果が例外を示すように設定する
(public member function of std::promise<R>) [編集]
スレッド終了時のみ通知を配信し、結果が例外を示すように設定する
(public member function of std::promise<R>) [編集]
English 日本語 中文(简体) 中文(繁體)