std::error_category::operator==,!=,<,<=>
From cppreference.com
< cpp | error | error category
| bool operator==( const error_category& rhs ) const noexcept; |
(1) | (C++11以降) |
| bool operator!=( const error_category& rhs ) const noexcept; |
(2) | (C++11以降) (C++20まで) |
| bool operator<( const error_category& rhs ) const noexcept; |
(3) | (C++11以降) (C++20まで) |
| std::strong_ordering operator<=>( const error_category& rhs ) const noexcept; |
(4) | (C++20以降) |
別のエラーカテゴリと比較します。
1) `*this` と `rhs` が同じオブジェクトを参照しているかどうかをチェックします。
2) `*this` と `rhs` が同じオブジェクトを参照していないかどうかをチェックします。
3) `this` と `&rhs` の順序によって `*this` と `rhs` を順序付けます。 `std::less<const error_category*>()(this, &rhs)` と同等です。
4) `this` と `&rhs` の順序によって `*this` と `rhs` を順序付けます。 `std::compare_three_way()(this, &rhs)` と同等です。
|
|
(C++20以降) |
[編集] パラメーター
| rhs | - | 比較する `error_category` を指定します。 |
[編集] 戻り値
1) `*this` と `rhs` が同じオブジェクトを参照している場合は `true`、そうでない場合は `false`。
2) `*this` と `rhs` が同じオブジェクトを参照していない場合は `true`、そうでない場合は `false`。
3) `*this` が、 `this` と `&rhs` の順序によって定義された順序で `rhs` よりも小さい場合は `true`。
4) `*this` が、 `this` と `&rhs` の順序によって定義された順序で `rhs` よりも小さい場合は `std::strong_order::less`、そうでない場合は `rhs` が順序で `*this` よりも小さい場合は `std::strong_order::greater`、それ以外の場合は `std::strong_order::equal`。