名前空間
変種
操作

std::make_error_code(std::io_errc)

提供: cppreference.com
< cpp‎ | io‎ | io errc
2015年11月30日 (月) 06:20時点におけるP12bot (トーク | 投稿記録)による版

 
 
入出力ライブラリ
入出力マニピュレータ
Cスタイルの入出力
バッファ
(C++98で非推奨)
ストリーム
抽象
ファイル入出力
文字列入出力
配列入出力
(C++98で非推奨)
(C++98で非推奨)
(C++98で非推奨)
同期化出力
エラーカテゴリインタフェース
(C++11)
 
std::io_errc
非メンバ関数
make_error_code(std::io_errc)
ヘルパークラス
 
ヘッダ <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.

目次

パラメータ

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.

#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

参照

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.

(関数) [edit]
プラットフォーム依存のエラーコードを保持します
(クラス) [edit]
(C++11)
iostream のエラーコード
(列挙) [edit]