名前空間
変種
操作

std::operator==,!=,<(std::error_code)

提供: cppreference.com
< cpp‎ | error‎ | error code
 
 
ユーティリティライブラリ
汎用ユーティリティ
日付と時間
関数オブジェクト
書式化ライブラリ (C++20)
(C++11)
関係演算子 (C++20で非推奨)
整数比較関数
(C++20)
スワップと型操作
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
一般的な語彙の型
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

初等文字列変換
(C++17)
(C++17)
 
 
 
ヘッダ <system_error> で定義
bool operator==( const error_code& lhs, const error_code& rhs ) noexcept;
(1) (C++11以上)
bool operator!=( const error_code& lhs, const error_code& rhs ) noexcept;
(1) (C++11以上)
bool operator<( const error_code& lhs, const error_code& rhs ) noexcept;
(1) (C++11以上)

2つのエラーコードオブジェクトを比較します。

1) lhsrhs が等しいかどうか比較します。
2) lhsrhs が等しくないかどうか比較します。
3) lhsrhs より小さいかどうか調べます。

[編集] 引数

lhs, rhs - 比較するエラーコード

[編集] 戻り値

1) エラーカテゴリおよびエラーコードが等しければ true
2) エラーカテゴリまたはエラーコードが等しくなければ true
3) lhs.category() < rhs.category() であれば true。 そうでなく lhs.category() == rhs.category() && lhs.value() < rhs.value() であれば true。 そうでなければ false

[編集] 関連項目

この error_code に対する error_category を取得します
(パブリックメンバ関数) [edit]
error_code の値を取得します
(パブリックメンバ関数) [edit]
(C++20で削除)(C++20で削除)(C++20)
error_conditionerror_code を比較します
(関数) [edit]