std::make_error_code(std::io_errc)
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
ヘッダ <ios> で定義
|
||
std::error_code make_error_code( std::io_errc e ); |
(C++11以上) | |
std::error_codeであるかのようにタイプstd::io_errcの値からreturn std::error_code(static_cast<int>(e), std::iostream_category())オブジェクトを構築します。 std::error_code引数が与えられた時に、この機能はstd::io_errcのコンストラクタによって呼び出されます.
Original:
Constructs an std::error_code object from a value of type std::io_errc as if by return std::error_code(static_cast<int>(e), std::iostream_category()). This function is called by the constructor of std::error_code when given an std::io_errc argument.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目次 |
パラメータ
e | - | エラーコード番号が表示されます
Original: error code number The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
値を返します
エラーカテゴリstd::error_codeに関連付け
e
からのエラーコード番号を保持している型の"iostream"の値.Original:
A value of type std::error_code that holds the error code number from
e
associated with the error category "iostream".The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
例
Run this code
#include <iostream> #include <system_error> int main() { std::error_code ec = std::make_error_code(std::io_errc::stream); std::cout << "Error code from io_errc::stream has category " << ec.category().name() << '\n'; }
出力:
Error code from io_errc::stream has category iostream
参照
(C++11) |
error_categoryからのエラー·コードを作成します Original: creates an error code from an error_category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数) |
(C++11) |
プラットフォーム依存のエラーコードを保持します (クラス) |
(C++11) |
iostream のエラーコード (列挙) |