「cpp/thread/future errc」の版間の差分
提供: cppreference.com
細 (r2.7.3) (ロボットによる 追加: de, en, es, fr, it, pt, ru, zh) |
細 (Use {{lc}}. Update links. Various fixes.) |
||
2行: | 2行: | ||
{{cpp/title|future_errc}} | {{cpp/title|future_errc}} | ||
{{cpp/thread/future_errc/navbar}} | {{cpp/thread/future_errc/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{header | ios}} |
− | {{ | + | {{| =c++11 | 1= |
enum class future_errc { | enum class future_errc { | ||
broken_promise, | broken_promise, | ||
12行: | 12行: | ||
}; | }; | ||
}} | }} | ||
− | {{ | + | {{end}} |
− | The scoped enumeration {{tt|std::future_errc}} defines the error codes reported by {{ | + | The scoped enumeration {{tt|std::future_errc}} defines the error codes reported by {{|std::future}} and related classes in {{|std::future_error}} exception objects. Only four error codes are required, although the implementation may define additional error codes. Because the appropriate specialization of std::is_error_code_enum is provided, values of type {{tt|std::future_errc}} are implicitly convertible to {{|std::error_code}}. |
===メンバー定数=== | ===メンバー定数=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{hitem |{{tr| 定数 | Constant }}| Explanation}} |
− | {{ | + | {{| {{tt|broken_promise}} | the asynchronous task abandoned its shared state }} |
− | {{ | + | {{| {{tt|future_already_retrieved}} | the contents of shared state were already accessed through {{|std::future}} }} |
− | {{ | + | {{| {{tt|promise_already_satisfied}} | attempt to store a value in the shared state twice }} |
− | {{ | + | {{| {{tt|no_state}} | attempt to access {{|std::promise}} or {{|std::future}} without an associated shared state }} |
− | {{ | + | {{end}} |
===ヘルパークラス=== | ===ヘルパークラス=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{tclass | cpp/thread/future_errc/is_error_code_enum | title=is_error_code_enum{{small|<std::future_errc>}}| notes={{mark c++11}} | extends the type trait {{|std::is_error_code_enum}} to identify future error codes}} |
− | {{ | + | {{end}} |
===非メンバ関数=== | ===非メンバ関数=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{fun | cpp/thread/future_errc/make_error_code | title=make_error_code{{small|(std::future_errc)}} | notes={{mark c++11}} | constructs a future error code}} |
− | {{ | + | {{fun | cpp/thread/future_errc/make_error_condition | title=make_error_condition{{small|(std::future_errc)}} | notes={{mark c++11}} | constructs a future error_condition}} |
− | {{ | + | {{end}} |
===例=== | ===例=== | ||
44行: | 44行: | ||
===も参照してください=== | ===も参照してください=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| cpp/error/error_code}} |
− | {{ | + | {{| cpp/error/error_condition}} |
− | {{ | + | {{end}} |
[[de:cpp/thread/future errc]] | [[de:cpp/thread/future errc]] |
2013年7月2日 (火) 16:05時点における版
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
ヘッダ <ios> で定義
|
||
enum class future_errc { broken_promise, |
(C++11以上) | |
The scoped enumeration std::future_errc
defines the error codes reported by std::future and related classes in std::future_error exception objects. Only four error codes are required, although the implementation may define additional error codes. Because the appropriate specialization of std::is_error_code_enum is provided, values of type std::future_errc
are implicitly convertible to std::error_code.
目次 |
メンバー定数
定数
Original: Constant The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Explanation |
broken_promise
|
the asynchronous task abandoned its shared state |
future_already_retrieved
|
the contents of shared state were already accessed through std::future |
promise_already_satisfied
|
attempt to store a value in the shared state twice |
no_state
|
attempt to access std::promise or std::future without an associated shared state |
ヘルパークラス
extends the type trait std::is_error_code_enum to identify future error codes (クラステンプレート) |
非メンバ関数
constructs a future error code (関数) | |
constructs a future error_condition (関数) |
例
This section is incomplete Reason: no example |
も参照してください
(C++11) |
プラットフォーム依存のエラーコードを保持します (クラス) |
(C++11) |
移植性のあるエラーコードを保持します (クラス) |